Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with mysql-connector-java-3.0.7

Status
Not open for further replies.

keegank

Programmer
Aug 12, 2003
10
GB
Hi, it's me again the poor fool who had his hard drive wiped 2 weeks before my Masters dissertation is due in.

I have got tomcat working. And I have got a MySQL database installed.

I am now trying to get tomcat to communicate with MySQL.

I have downloaded and expanded the following file

mysql-connector-java-3.0.7-stable

and followed the instructions but my site is no talking to the DB.

Can anyone help me with this.

Andy
 
No errors, and no feedback?
is the driver a .jar? where was it saved? is the DB running? and so on and so on...should lead you to the root cause of ur problems...

libaax
 
I have a database named project with a table called registration.

The code I am using in the servlet looks like this

Class.forName( "org.gjt.mm.mysql.Driver" );
Conn = DriverManager.getConnection( "jdbc:mysql://localhost/project?user=dognobbler&password=deepthr0at");

Statement stmt = Conn.createStatement();

query = "SELECT * from registration";
ResultSet result = stmt.executeQuery(query);

while(result.next())
{
String NameResult = result.getString("username");
String RegResult = result.getString("password");
String SexResult = result.getString("email");

out.println( &quot;<b>Name:</b> &quot; + NameResult + &quot;<br>&quot;);
out.println( &quot;<b>Registration:</b> &quot; + RegResult + &quot;<br>&quot;);
out.println( &quot;<b>Sex:</b> &quot; + SexResult + &quot;<p>&quot;);
}
stmt.close();
Conn.close();


The error I am currently getting is

SQLException caught: Invalid authorization specification: Access denied for user: 'dognobbler@127.0.0.1' (Using password: YES)

Can anyone help?


Thanks


Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top