I have just upgraded to the latest MySQL 4.1.10 and MySQL-Connector-Java-3.1.7 and my application has stopped working. I am attempting to create a user and a database programatically. Everything appears to work great until the new user tries to connect to the new table.
I have connected to MySQL using the root user and created the new database using the SQL
"CREATE DATABASE IF NOT EXISTS jrtspa"
which works just fine. I then create the new user by using the GRANT command with the SQL
"GRANT CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE ON jrtspa.* TO jrtsusr"
which also seems to work. I look in the mysql database and the user was created successfully and has all of the correct privileges. Of course all of the privileges are set to 'N' in the user table but are set to 'Y' in the db table. When I try to use the new user to connect to the database using the path
"jdbc:mysql://localhost/jrtspa?user=jrtsusr"
I get the message
Access denied for user ''@'localhost' to database 'jrtspa'.
I have done all of this using Java, and have not had these issues until I upgraded to the latest versions of MySQL and MySQL-Connector-Java.
I am assuming that something has been added in this later version that I am not setting up or using correctly, but I cannot find anything. Any help would be greatly appreciated!
I am working on a Macintosh running OS X 10.3.8 and developing my code in NetBeans.
Mark Hamilton
markhamilton1@mac.com