List:General Discussion« Previous MessageNext Message »
From:Tauren Mills Date:May 23 2000 9:50pm
Subject:User permission problem
View as plain text  
I'm trying to configure an additional database user (newuser) to connect to
a database that already exists and has another database user (olduser) that
connects to it without problems.  I believe I've done this correctly,
however I always get this error when connecting using the new user:

[root@s2 olduser]# mysql -unewuser -p bogus_dev
Enter password:
ERROR 1044: Access denied for user: 'newuser@localhost' to database
'bogus_dev'

I created the new user with these two commands:

grant all privileges on bogus_dev.* to newuser@localhost identified by
'boguspass';
grant all privileges on bogus_dev.* to newuser@"%" identified by
'boguspass';

When I compare the two user records, they look alike:

mysql> select * from user where user = "newuser" or user = "olduser";
+-----------+---------+------------------+-------------+-------------+------
-------+-------------+-------------+-----------+-------------+--------------
-+--------------+-----------+------------+-----------------+------------+---
---------+
| Host      | User    | Password         | Select_priv | Insert_priv |
Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv |
Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv |
Index_priv | Alter_priv |
+-----------+--------+------------------+-------------+-------------+-------
------+-------------+-------------+-----------+-------------+---------------
+--------------+-----------+------------+-----------------+------------+----
--------+
| %         | newuser | xxxxxxxxxxxxxxxx | N           | N           | N
| N           | N           | N         | N           | N             | N
| N         | N          | N               | N          | N          |
| localhost | newuser | xxxxxxxxxxxxxxxx | N           | N           | N
| N           | N           | N         | N           | N             | N
| N         | N          | N               | N          | N          |
| localhost | olduser | xxxxxxxxxxxxxxxx | N           | N           | N
| N           | N           | N         | N           | N             | N
| N         | N          | N               | N          | N          |
| %         | olduser | xxxxxxxxxxxxxxxx | N           | N           | N
| N           | N           | N         | N           | N             | N
| N         | N          | N               | N          | N          |
+-----------+---------+------------------+-------------+-------------+------
-------+-------------+-------------+-----------+-------------+--------------
-+--------------+-----------+------------+-----------------+------------+---
---------+
4 rows in set (0.00 sec)

When I compare the two users in the db table, they too look good:

mysql> select * from db where user = "newuser" or user = "olduser";
+-----------+---------------+---------+-------------+-------------+---------
----+-------------+-------------+-----------+------------+-----------------+
------------+------------+
| Host      | Db            | User   | Select_priv | Insert_priv |
Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv |
References_priv | Index_priv | Alter_priv |
+-----------+---------------+---------+-------------+-------------+---------
----+-------------+-------------+-----------+------------+-----------------+
------------+------------+
| localhost | bogus_dev     | olduser | Y           | Y           | Y
| Y           | Y           | Y         | N          | Y               | Y
| Y          |
| %         | bogus_dev     | olduser | Y           | Y           | Y
| Y           | Y           | Y         | N          | Y               | Y
| Y          |
| localhost | bogus_dev     | newuser | Y           | Y           | Y
| Y           | Y           | Y         | N          | Y               | Y
| Y          |
| %         | bogus_dev     | newuser | Y           | Y           | Y
| Y           | Y           | Y         | N          | Y               | Y
| Y          |
+-----------+---------------+---------+-------------+-------------+---------
----+-------------+-------------+-----------+------------+-----------------+
------------+------------+
4 rows in set (0.00 sec)

I've read section 6.15 of the manual and cannot see what else might be
wrong.  Any suggestions?

Thanks!
Tauren


Thread
User permission problemTauren Mills24 May
  • Re: User permission problemsinisa24 May