java.sql.SQLException

null, message from server: "Host '172.17.0.9' is not allowed to connect to this MySQL server"


Samebug tips1

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web13317

Solution icon of stackoverflow
null, message from server: "Host '172.17.0.9' is not allowed to connect to this MySQL server"

Solution icon of oraclecommunity
via Oracle Community by 843833, 1 year ago
null, message from server: "Host 'shost5.serverhostingpro.com' is not allowed to connect to this MySQL server"

Solution icon of stackoverflow
null, message from server: "Host '172.23.251.154' is not allowed to connect to this MySQL server"

Solution icon of stackoverflow
null, message from server: "Host 'xxx.fuchs.com' is not allowed to connect to this MySQL server"

Solution icon of stackoverflow
null, message from server: "Host 'PC008' is not allowed to connect to this MySQL server"

Solution icon of web
via mysql.com by Unknown author, 1 year ago
null, message from server: "Host 'testclient.testcompany.com' is not allowed to connect to this MySQL server"

Solution icon of web
via hivmr.com by Unknown author, 1 year ago
null, message from server: "Host 'shost5.serverhostingpro.com' is not allowed to connect to this MySQL server"

Solution icon of oraclecommunity
via Oracle Community by 843859, 8 months ago
null, message from server: "Host 'shost5.serverhostingpro.com' is not allowed to connect to this MySQL server"

Solution icon of github
via GitHub by xiuleid
, 1 month ago
null, message from server: "Host '10.138.125.19' is not allowed to connect to this MySQL server"

Solution icon of stackoverflow
null, message from server: "Host '103.253.39.4' is not allowed to connect to this MySQL server"

Stack trace

  • java.sql.SQLException: null, message from server: "Host '172.17.0.9' is not allowed to connect to this MySQL server" at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:959) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1038) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 11 months ago
85 times, 6 days ago
101 times, 1 week ago
Once, 3 weeks ago
3 times, 3 weeks ago
153 more bugmates