Joachim,

Monday, January 28, 2002, 2:15:51 PM, you wrote:

JH> I have installed MySQL Version 3.23.47 on Suse Linux 7.2 (Kernel 2.4.4)
JH> After the installation of mysql  I run the mysql_install_db script

JH> I could change the passwords for root so I reset the GRANT table using 
JH> ../safe_mysqld --skip-grant-tables

JH> and than I set the passwords manually using
JH> myql -u root mysql
JH> mysql> INSERT INTO user (Host,User,Password)
JH>             VALUES(''%','root',PASSWORD('abc'));
JH> mysql> INSERT INTO user (Host,User,Password)
JH>             VALUES('localhost','root',PASSWORD('abc'));
JH> mysql> FLUSH PRIVILEGES;

JH> I can set the password for e.g root (atleast I don't get any error message) using 
JH> mysqladmin -h localhost -u root -p password 'def'


JH> but when I try to access the DB using

JH> mysql -h localhost -u root -p mysql

JH> (depending on the password) I get the following error message:

JH> ERROR 1044: Access denied for user: 'root@localhost' to 
JH> database 'mysql' (if I use abc as password)

JH> or

JH> ERROR 1045: Access denied for user: 'root@localhost' 
JH> (Using password: YES) (if I use def as password)

See the output of following: 

     SHOW GRANTS FOR root@localhost;

I think that you get something like that: 

GRANT USAGE ON *.* TO 'root'@'localhost' 
IDENTIFIED BY PASSWORD 'your_password'
USAGE is a synonym for "no privileges".

Use GRANT statement to set privileges for user. For example: 

     GRANT ALL ON *.* TO 'root'@localhost 
     IDENTIFIED BY 'password' WITH GRANT OPTIONS


Check the following link: http://www.mysql.com/doc/G/R/GRANT.html




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to