This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes MySQL user and password errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL user and password errors " Watch "MySQL user and password errors " New topic
Author

MySQL user and password errors

Cathy Valdez
Greenhorn

Joined: Oct 22, 2003
Posts: 23
MySQL 4.0.17 and MySQL Connector/J 3.0 were installed in my PC.
1.) I'm trying to create a user at the same time grant privileges to that user using MySql, by this command:

For example:

but error below occurred:


2.) I'm trying to connect to the server, by the command below:

but error below occured:

Can anybody there help? I'm new to MySQL, what do errors above mean? What should I do to fix those errors?
Any suggestions would be greatly appreciated. Thanks in advance.
Cathy
[ February 13, 2004: Message edited by: Cathy Valdez ]
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Does the DB actually require a user/password and have you tried Aaccesing it without one? I have myAQL running on my local machine and I never have to access it without a user/password.
I connect to a DB called "notepad" as follows.
Connection databaseConnection = DriverManager.getConnection("jdbc:mysql://localhost/notepad");


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
leo donahue
Ranch Hand

Joined: Apr 17, 2003
Posts: 327
Hi Cathy,
I think that using the -h switch allows you to connect to a MySQL database if it were installed on another machine. Maybe you could just try using:
c:mysql\bin>mysql -u cathy -p
Try logging in as root and then run this sql statement:
grant create, create temporary tables, delete, execute, index, insert,
lock tables, select, show databases, update
on WordGames.*
to cathy@localhost identified by 'aprfeb';


Thanks, leo
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: MySQL user and password errors
 
Similar Threads
mysql JDBC driver classpath problem.
MySQL : Access denied for mysqldump
Problem when creating stored procedure in MySql5.0
Unable to connect to MySQL
How Do I Remove Users From MySQL Database?