mpls2000
04-15-2003, 03:58 AM
I run my server (Tomcat) at my PC (10.5.1.5) and trying to connect to a mySQL database running at another PC.
The database I tried to connect is myDB and below is my connection String:
String connStr = "jdbc:mysql://10.5.10.125/myDB?User=admin;Password=admin";
conn = DriverManager.getConnection(connStr);
But when I run the class file, I encountered the following error:
java.sql.SQLException: Communication failure during handshak
e. Message from server: "Access denied for user: '@10.5.1.5 to database 'myDB'"
java.lang.NullPointerException
at com.myapp.myDatabase.QueryExecutioner.close(Unknown Source)
Please suggest what is wrong and how to solve it. Very urgent.
Thank you.
The database I tried to connect is myDB and below is my connection String:
String connStr = "jdbc:mysql://10.5.10.125/myDB?User=admin;Password=admin";
conn = DriverManager.getConnection(connStr);
But when I run the class file, I encountered the following error:
java.sql.SQLException: Communication failure during handshak
e. Message from server: "Access denied for user: '@10.5.1.5 to database 'myDB'"
java.lang.NullPointerException
at com.myapp.myDatabase.QueryExecutioner.close(Unknown Source)
Please suggest what is wrong and how to solve it. Very urgent.
Thank you.