Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 1512
  • 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';
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic