Ubuntu全自动安装mysql8.0
apt-get install mysql-server
cd /etc/mysql
cat debian.cnf
然后登录进去
修改mysql密码
update user set Host='%' where User='root';
update user set authentication_string = '' where user='root' ;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'xx';
flush privileges;
遇到问题:
如果缺少set密码为'' 这一步,会报错
ERROR 1396 (HY000): Operation ALTER USER failed for ‘root’@‘localhost’,密码重置失败。
- 自动安装的版本为8.0
2 条评论
?未来展望类?
哈哈哈,写的太好了https://www.lawjida.com/