Hi Folks,
I'm having problems in connecting to a mySql DB through JDBC on JBoss.
I'm using the following code.
try
| {
| String userName = "admin";
| String password = "m9ad3e";
| String url = "jdbc:mysql://hh-linux1/IntegraDB";
| Class.forName ("com.mysql.jdbc.Driver").newInstance ();
| conn = DriverManager.getConnection (url, userName, password);
| System.out.println ("Database connection established");
|
|
| }
| catch (Exception e)
| {
| e.printStackTrace();
| System.err.println ("Cannot connect to database server");
| }
It works fine on Windows/Tomcat.
But when i deploy the .war file on JBoss server running on linux it gives exception.
java.sql.SQLException: Access denied for user
'admin'(a)'HH-Linux1.usbeck.de' (using password: YES)
| 2009-09-28 12:56:09,844 ERROR [STDERR] at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
| 2009-09-28 12:56:09,844 ERROR [STDERR] at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:798)
| 2009-09-28 12:56:09,844 ERROR [STDERR] at
com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3700)
| 2009-09-28 12:56:09,844 ERROR [STDERR] at
com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1203)
|
it is even trying to connect to some other server somehow
admin'(a)'HH-Linux1.usbeck.de'?
Can someone pls help.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257321#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...