MySQL查看默認密碼和修改密碼


查看默認密碼

1. 查找日志目錄

find / -name mysqld.log

2. vim 查看

3. 搜索password關鍵字


修改密碼

1. 使用默認密碼登陸

2. 修改密碼

MySQL5.7及以下版本:update mysql.user set authentication_string=password('xxxxxx') where user='root';

其他版本:update user set password=password('xxxxxx') where user='root';

3. 立即生效

flush privileges;


免責聲明!

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



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