• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MySQL user and password errors

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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");
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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';
 
reply
    Bookmark Topic Watch Topic
  • New Topic