远程连接MySQL时发现如下错误:
java.sql.SQLException: null, message from server: "Host '192.168.30.23' is not allowed to connect to this MySQL server"
解决方法:
进入MySQL的bin目录,执行如下命令:
mysql -u root -proot
mysql> user mysql;
mysql> update user set host = '%' where user = 'root';
mysql> flush privileges;
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/4186.html