Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server
java.sql.SQLException: null, message from server: “Host ‘192.168.0.127’ is not allowed to connect to this MySQL server”
原因:该host不是远程对象,不能通过该对象访问数据库
解决:
USE mysql ;
SELECT USER,HOST,PASSWORD FROM USER;
UPDATE USER SET HOST = '%' WHERE USER='root';
FLUSH PRIVILEGES;
还没有评论,来说两句吧...