macOS mysql,无法更改默认密码

时间:2017-03-07 13:42:39

标签: mysql macos

我按照说明https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/。 在安全模式下,我打开一个新的终端窗口,我输入

mysql -u root

Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 7
Server version: July 5, 17 MySQL Community Server (GPL)

又迈出了一步

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'MyNewPass';
ERROR 1396 (HY000): Operation ALTER USER failed for 'root' @ 'localhost'

密码无法更改。你能告诉我吗?

1 个答案:

答案 0 :(得分:0)

发送此更改“新密码”标识的用户“root”@“localhost”;