This content has been marked as final. Show 6 replies
Try adding 'autoReconnect=true' to the jdbc connection string and see if this solve the problem.
Thanks for responding!
I attempted this, but it merely fails three times.
SQLException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
The problem was with Database Access permission.
The code is
mysql> GRANT ALL PRIVILEGES ON tablename.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
Thanks, but that doesn't seen to solve the issue. After setting the permissions, I changed the username and password in the java code to use the root account, but it still would not work. I have some doubts that this is a permissions issue.
Alright, I think I found the root cause of this problem. On a hunch, I went and ran some stuff I've written before, and nothing written in java can use the network. Java's entire socket layer is down.
But thanks for the help anyway!
alright, I found the issue. I'm running Debian Squeeze. There is a problem with squeeze that currently breaks all java networking. Bug description and fix here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056.