3 messages in com.mysql.lists.javaRe: Access denied problem
FromSent OnAttachments
Heman18 Apr 2004 08:29 
john redden18 Apr 2004 10:45 
Rikard Froberg20 Apr 2004 14:16 
Subject:Re: Access denied problem
From:john redden (jred@matrix.cc)
Date:04/18/2004 10:45:30 AM
List:com.mysql.lists.java

1.) reproduce the behavior the java program using the mysql command line tool or your favorite GUI tool by connecting to the server. 2.) double check the atttributes you are using in your class instantiation for JConnect. 3.) is your java program a Plain Old Java Object or are you running in some container (class path issues ...)?

hope that helps.

John R. Zenred Computing.

On Sunday 18 April 2004 08:29, Heman wrote:

Hi

I can't figure out how to access a Mysql database from a Java programm. I always get SQLException access denied for user @computer_name. The server (mysqld) runs on localhost (127.0.0.1) and is accessed by a local user (local user executes java). Executing:

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON yourdb_name.* TO dbuser@localhost IDENTIFIED BY 'dbpassword';

hasn't helped either. What am I doing wrong? I would be grateful, if someone could explain all steps.

Thanks!

My System: Debian (woody/backports), mysqld Ver. 4.0.18, java 1.4.2_04, put mysql-connector-java-3.0.11-stable-bin.jar into /usr/lib/j2sdk1.4-sun/jre/lib/ext/, removed the skip-networking in /etc/mysql/my