熱門文章

2016年12月3日 星期六

Mac OSX 安裝/更改mysql password

OS X

原本在brew 安裝了mysql 但是忘記了
又去官網下載了mysql.dmg
這邊給了一個臨時的pw






command line 使用
➜  tmp git:(master) mysql -u root -p             
Enter password: 


輸入臨時pw

然後再更改

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> UPDATE mysql.user SET Password=PASSWORD('root')
    -> WHERE User='root';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SET PASSWORD = PASSWORD('root');

Query OK, 0 rows affected, 1 warning (0.04 sec)


pw就更新完畢了


http://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac


http://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac-os

mysql

Setup Ruby On Rails onMac OS X 10.10 Yosemite

沒有留言:

張貼留言