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)