blastus
September 18th, 2005, 12:50 AM
I can login to MySQL with...
mysql -h localhost -u root -p mysql
...no problem and do everything. The problem I have is with the MySQL Connector/J JDBC driver. I have always used mysql-connector-java-3.0.11-stable-bin.jar and it has worked fine on Windows XP (except for idle connection timeouts which is an unrelated issue.) When I try to connect to MySQL with...
jdbc:mysql://localhost/mysql?autoReconnect=true&user=root&password=mypassword
...I get this...
Server connection failure during transaction.
Due to underlying exception: 'java.sql.SQLException:
Data source rejected establishment of connection,
message from server: "Host 'localhost.localdomain' is
not allowed to connect to this MySQL server"'.
Does anyone know how to fix this and/or recommend a decent MySQL JDBC driver for Linux?
I've tried all kinds of tricks like using 127.0.0.1 or localhost.localdomain instead of localhost. I've tried granting all privileges to root@localhost, I've looked at the /etc/mysql/my.cnf and no skip-networking is not on, and I've looked in /etc/hosts and yes my hostname (neo), localhost, and localhost.localdomain is in that file, finally I've messed around with my firewall.
mysql -h localhost -u root -p mysql
...no problem and do everything. The problem I have is with the MySQL Connector/J JDBC driver. I have always used mysql-connector-java-3.0.11-stable-bin.jar and it has worked fine on Windows XP (except for idle connection timeouts which is an unrelated issue.) When I try to connect to MySQL with...
jdbc:mysql://localhost/mysql?autoReconnect=true&user=root&password=mypassword
...I get this...
Server connection failure during transaction.
Due to underlying exception: 'java.sql.SQLException:
Data source rejected establishment of connection,
message from server: "Host 'localhost.localdomain' is
not allowed to connect to this MySQL server"'.
Does anyone know how to fix this and/or recommend a decent MySQL JDBC driver for Linux?
I've tried all kinds of tricks like using 127.0.0.1 or localhost.localdomain instead of localhost. I've tried granting all privileges to root@localhost, I've looked at the /etc/mysql/my.cnf and no skip-networking is not on, and I've looked in /etc/hosts and yes my hostname (neo), localhost, and localhost.localdomain is in that file, finally I've messed around with my firewall.