I need urgent help on this, please!
I'm trying to connect a program in Java with the MySQL installed with WAMPSERVER v2.2. I'm connecting to:
jdbc:mysql://localhost/configuracion_servidor:3306?autoReconnect=true
My user is "root", no password as default. testmysql.php works fine. But in Java I get this error (copy-pasted from console):
Could not create connection to database server. Attempted reconnect 3
times. Giving up.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not
create connection to database server. Attempted reconnect 3 times. Giving up.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:
2226)
...
Am I missing something in "my.ini"?
I found this: [
bugs.mysql.com] . It says one should add "mysqld : ALL : ACCEPT" to /etc/hosts.allow... how do you do that in WAMP? Does it help anyway?
Please help me here
Thanks in advance!