deepin安装mysql5.7无法使用root用户登录
Tofloor
poster avatar
carlos1234
deepin
2019-02-06 06:08
Author
使用命令sudo apt-get install mysql-server mysql-client安装mysql,然后使用debian-sys-miant用户登录进去修改mysql.user表,修改成如图所示的,然后重启mysql服务后,仍然是报错。
Reply Favorite View the author
All Replies
avatar
carlos1234
deepin
2019-02-09 04:50
#1
已解决
使用sudo cat /etc/mysql/debian.cnf查看用户名和密码并用其登录
之后使用use mysql;命令选中mysql数据库
用命令update user set authentication_string=password("这里填写自定义密码") where user="root";更新user表
然后再使用update user set plugin="mysql_native_password" where user="root"命令更新user表
使用flush privileges;命令
最后,退出,使用systemctl restart mysql.service命令重启mysql即可使用root用户登录。
Reply View the author