Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Exclamation Unanswered: Weird : -- ERROR 1044 (42000): Access denied for user: 'abc'@'%' to database 'Toucan'

    Hi

    I am getting the error
    ERROR 1044 (42000): Access denied for user: 'abc'@'%' to database 'Toucan' after restarting server, but I don't understand why.

    I use linux RPM MySQL-server-4.1.1-1


    ** First, I log on as root, I create a user with the Grant command and I give him access to table EntreeTemps in database Toucan

    mysql --user=root --password=myrootpassword
    use Toucan;
    GRANT SELECT ON EntreeTemps TO abc IDENTIFIED BY 'def';
    FLUSH PRIVILEGES;
    EXIT

    ** Then, I reconnect to the database, using my new user

    mysql --user=abc --password=def
    use Toucan;
    SELECT * FROM EntreeTemps;

    ** So far, everything works very well, I am able to obtain my data.


    ** BUT ...

    ** Then, if I restart the MySQL Server daemon (I restart the service) and I connect with this line :

    mysql --user=abc --password=def

    ** so far ok...

    use Toucan;

    ** THEN I get the ERROR 1044 (42000): Access denied for user: 'abc'@'%' to database 'Toucan'. I am unable to use the database Toucan !!!

    ** It used to work with the previous version, the 4.1.0-0

    ** Any clue why this happens??? I have the feeling the system doesn't read the table tables_priv where the granted privileges are stored ...
    Last edited by Toucan; 02-11-04 at 15:36.

  2. #2
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137

    Re: Weird : -- ERROR 1044 (42000): Access denied for user: 'abc'@'%' to database 'Tou

    I ran similar permissions on my machine (same MySQL version) and got access denied errors as well. I then tried to connect from another machine and got in. What allowed me to be able to connect from the local machine was to grant the user abc@localhost the same privileges:
    Code:
    +-----------------------------------------------------------------------------------+
    | Grants for abc@localhost                                                          |
    +-----------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'abc'@'localhost' IDENTIFIED BY PASSWORD '7b16b68b22ae3ab6' |
    | GRANT SELECT ON `toucan`.`entreetemps` TO 'abc'@'localhost'                       |
    +-----------------------------------------------------------------------------------+

  3. #3
    Join Date
    Feb 2004
    Posts
    2

    No, that's not the problem ...

    Originally posted by aus
    I ran similar permissions on my machine (same MySQL version) and got access denied errors as well. I then tried to connect from another machine and got in.
    Well, this is not the case for me. I tried to connect from remote machine, and I got the same result. I tried the code you suggested me, but it gave me no result. - I insist on the fact that I needed to restart the MySQL server daemon to get the problem.

    I granted rights on a specific table of the database (recorded in tables_priv), but I didn't grant rights on the database itself specifically.

    When I call the command "use Toucan", I though the server checks the mysql.db table, and if record is not found, then checks in mysql.tables_priv. It did in previous version. But now, it seems that it only checks the "mysql.db" table, so the granted rights I granted on EntreeTemps are ignored...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •