1. 程式人生 > >(辦公)mysql連線不上(java.sql.SQLException: null, message from server: "Host 'LAPTOP-O0GA2P8J' is not allowed to connect to this MySQL server&qu

(辦公)mysql連線不上(java.sql.SQLException: null, message from server: "Host 'LAPTOP-O0GA2P8J' is not allowed to connect to this MySQL server&qu

轉載自csdn文章:https://blog.csdn.net/Tangerine_bisto/article/details/80346151
1
.對所有主機進行訪問授權 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY'mypassword' WITH GRANT OPTION; 重新整理 FLUSH PRIVILEGES; 2.更改mysql庫下的user表 update user set host = '%' where user = 'root'; FLUSH RIVILEGES