Created
May 4, 2016 12:32
-
-
Save Khanashima/fa03142385e1a26a30b0e961b224026b to your computer and use it in GitHub Desktop.
MySQL ver5.7でrootのパスワードを忘れた場合の再設定方法 ref: http://qiita.com/kiimiiis/items/a8a47bc3065779e1dc0d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos65 log]# service mysqld stop | |
[root@vagrant-centos65 log]# mysqld_safe --skip-grant-tables & | |
mysql> use mysql; | |
mysql> UPDATE mysql.user | |
-> SET authentication_string = PASSWORD('新パスワード'), password_expired = 'N' | |
-> WHERE User = 'root' AND Host = 'localhost'; | |
mysql> FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment