This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL user and password errors

 
Cathy Valdez
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
 
leo donahue
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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';
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic