【異常】連接MySQL權限異常SQLException: Access denied for user 'root'@'192.168.xxx.xxx' (using password: YES)


IDEA程序訪問Mysql,出現權限異常。
SQLException: Access denied for user 'root'@'192.168.119.1' (using password: YES)


應該是mysql中的特定庫、特定表等對特定的用戶、特定的ip開放。

所以可以修改一下,在mysql中執行:grant all privileges on *.* to root@'%' identified by '123456';

表示root用戶可以在任何ip都可以訪問任何庫的任何對象,密碼是123456

生產上,按實際情況而定。


免責聲明!

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



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