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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

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

,

Make sure you are using InnoDB storage engine and READ-COMMITTED transaction isolation level and increase the database server innodb_lock_wait_timeout variable to about 500.

Solutions on the web

via Stack Overflow by pier92
, 9 months ago
null, message from server: "Host '172.17.0.9' is not allowed to connect to this MySQL server"
via Stack Overflow by user2648752
, 2 years ago
null, message from server: "Host '192.168.1.100' is not allowed to connect to this MySQL server"
via Stack Overflow by Ravi H Tapela
, 2 years ago
null, message from server: "Host 'ravi' is not allowed to connect to this MySQL server"
via Stack Overflow by khalil
, 1 year ago
null, message from server: "Le h?te 'khalil.home' n'est pas authoris? ? se connecter ? ce serveur MySQL"
via Stack Overflow by prolink007
, 8 months ago
null, message from server: "Host '192.168.1.102' is not allowed to connect to this MySQL server"
null, message from server: "Host '103.253.39.4' is not allowed to connect to this MySQL server"
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.(ConnectionImpl.java:795)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44)

Users with the same issue

8 times, 2 days ago
4 times, 3 days ago
18 times, 6 days ago
2 times, 1 week ago
326 times, 2 weeks ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.