MySQL5.7修改用戶密碼


在MySQL 5.7 password字段已從mysql.user表中刪除,新的字段名是“authenticalion_string”.

更新root的密碼

格式:

  update user set authentication_string=password('新密碼') where user='root' and Host='localhost';

例:

選擇數據庫

use mysql;

修改密碼

update user set authentication_string=password('123.com') where user='testuser' and Host='%';

刷新權限

flush privileges;


免責聲明!

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



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