原文:java.sql.SQLException: null, message from server: "Host 'XXX' is not allowed to connect to this MySQL server"

原因是:远程服务器不允许你的java程序访问它的数据库。所以,我们要对远程服务器进行设置,使它允许你进行连接。 解决步骤 打开mysql控制台,输入:use mysql 输入:show tables 输入:select host from user 输入:update user set host where user root 重启服务就可以连上了 ...

2020-03-18 10:57 0 661 推荐指数:

查看详情

解决java.sql.SQLException: null, message from server: "Host xxx' is not allowed to connect to this MySQL server异常

MySQL迁移到新服务器后,重新安装了MySQL8(解压方式的安装),web服务器连接,后台报了这个错。 运维同学,检查了MySQL服务器的防火墙设置,没有限制3306端口,且通过telnet方式,可以在web服务器上测通MySQL服务器上的端口,因此,服务器本身的ip或者端口限制基本排除 ...

Wed Apr 20 23:24:00 CST 2022 0 3168
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM