At 13:15 +0100 1/28/02, Joachim Hörnle wrote:
>The mysql access control is drinving me crazy.
>
>I have installed MySQL Version 3.23.47 on Suse Linux 7.2 (Kernel 2.4.4)
>After the installation of mysql  I run the mysql_install_db script
>
>I could change the passwords for root so I reset the GRANT table using
>../safe_mysqld --skip-grant-tables
>
>and than I set the passwords manually using
>myql -u root mysql
>mysql> INSERT INTO user (Host,User,Password)
>             VALUES(''%','root',PASSWORD('abc'));
>mysql> INSERT INTO user (Host,User,Password)
>             VALUES('localhost','root',PASSWORD('abc'));

That defines entries in the user table, but doesn't set any of the global
privileges.  As a result, they're all set to the default of 'N'.  This
means you'll be able to connect, but you won't be able to use any
databases.

I'd predict that if you ran your mysql commands below without specifying
the database on the end, that you'd be able to connect.  But then if you
issue a USE mysql; statement, you'll get an access denied error.

>mysql> FLUSH PRIVILEGES;
>
>I can set the password for e.g root (atleast I don't get any error
>message) using
>mysqladmin -h localhost -u root -p password 'def'
>
>
>
>but when I try to access the DB using
>
>mysql -h localhost -u root -p mysql
>
>(depending on the password) I get the following error message:
>
>ERROR 1044: Access denied for user: 'root@localhost' to database
>'mysql' (if I use abc as password)
>
>or
>
>ERROR 1045: Access denied for user: 'root@localhost' (Using
>password: YES) (if I use def as password)
>
>Any suggestion or idea would be appreciated. Thanks!
>
>Joachim Hoernle


---------------------------------------------------------------------
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