授權MySQL root 用戶所有權限


 1 -- 登錄
 2 mysql -u root -p
 3 -- 查詢mysql用戶
 4 select user,host,authentication_string from mysql.user;
 5 -- 切換到mysql庫
 6 use mysql;
 7 -- 修改root用戶host
 8 update user set host='%' where user='root';
 9 -- 授權
10 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
11 -- 刷新
12 FLUSH PRIVILEGES;

 


免責聲明!

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



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