mac mysql error You must reset your password using ALTER USER statement before executing this statement.


安裝完mysql 之后,登陸以后,不管運行任何命令,總是提示這個

step 1: SET PASSWORD = PASSWORD('your new password');

step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;

step 3: flush privileges;

完成以上三步退出再登,使用新設置的密碼就行了,以上除了紅色的自己修改成新密碼外,其他原樣輸入即可

參考1: https://dev.mysql.com/doc/refman/5.6/en/alter-user.html

參考2: http://dev.mysql.com/doc/refman/5.7/en/password-expiration-policy.html

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM