【发布时间】:2016-10-02 01:41:21
【问题描述】:
在安装mysql的时候,我没有在root密码字段中放任何东西,但是当我运行mysql -u root时,我仍然得到Access denied for user 'root'@'localhost'。
我在没有授权表sudo mysql_safe --skip-grant-tables &的安全模式下启动了mysql,然后毫无问题地使用mysql -u root进入。
然后我做了use mysql; update user set authentication_string=null where user='root';,我得到了:
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
有人知道为什么密码没有更新吗?
【问题讨论】:
标签: mysql ubuntu-16.04 mysql-5.7