您的位置:首页 > 数据库 > MySQL

Mac版下Mysql错误修正

2016-03-13 09:09 597 查看
MACMYSQL

 问题1:初次安装后无法进入问题

a.  停止 mysql server.  通常是在 '系统偏好设置' > MySQL > 'Stop MySQL Server'

 

b.  打开终端,输入:

 

       sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables

 

c.  打开另一个新终端,输入:

 

       sudo /usr/local/mysql/bin/mysql -u root

 

       UPDATE mysql.user SET authentication_string=PASSWORD('新密码') WHERE User='root';

       注意authentication_string有下划线

       FLUSH PRIVILEGES;

 

       \q

d. 重启MySQL.

 

问题2:ERROR 1820 (HY000): You must reset yourpassword using ALTER USER statement before executing this statement.

mysql> UPDATE mysql.user SETPassword=PASSWORD('your_new_password') WHERE User='root';
mysql> SETPASSWORD = PASSWORD('your_new_password');
 
Query OK, 0 rowsaffected, 1 warning (0.01 sec)

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mac mysql