:: CONNECTION PROBLEM :: 08001 :: Pl. Help !!
Posted by: Praveen Vasireddy
Date: April 04, 2005 08:24PM

Hi All,
I am trying to get a connection to the database using the following code snippet.
.................................................................................................................................................
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (Exception e) {
System.err.println("Failed to load MYSQL JDBC drivers.");
}
// get a connection
try {
con =DriverManager.getConnection("jdbc:mysql:///mtogo?user=root&password=p4ssword");
} catch (SQLException e) {
System.err.println("***************************");
System.out.println("SQLException: " + e.getMessage());
System.out.println("SQLState: " + e.getSQLState());
System.out.println("VendorError: " + e.getErrorCode());
System.err.println("***************************");
}
.................................................................................................................................................
When I try to connect using the same code in WinXP system...it works fine.

I transfered the code to redhat 9.0 system and I get the following error
.................................................................................................................................................
Problems connecting to MTOGO with user:root and pwd:p4ssword and port 3306
***************************
SQLException: Server configuration denies access to data source
SQLState: 08001
VendorError: 0
***************************
.................................................................................................................................................
- When I connect at the shell using the same user & password ...it gets connected.
- I have access to the database .
- I checked even the port and its listening on default port.

Can you please tell me how to fix this problem.
Thanks in advance.
PV

Options: ReplyQuote


Subject
Written By
Posted
:: CONNECTION PROBLEM :: 08001 :: Pl. Help !!
April 04, 2005 08:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.