Please keep this on the list.

Chris Fonnesbeck wrote:
Something seems rather screwed up; I was starting from scratch by
revoking all privileges from joe and deleting him. I got the
following:

mysql> REVOKE ALL PRIVILEGES ON  *.* FROM  'joe'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
+------------------------------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED] |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'joe'@'localhost' IDENTIFIED BY PASSWORD
'*AC57754462B6D4C373263062D60EDC6E452E574D' |
+------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Why would he still have privileges at this point?

He doesn't. USAGE means no privileges. It's counterintuitive, I know. REVOKE removes privileges, it doesn't drop users. Use

  DROP USER 'joe'@'localhost';

to get rid of him.  <http://dev.mysql.com/doc/mysql/en/drop-user.html>

Starting with another user, I ran the test that you suggested:

mysql> GRANT ALL ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'testing';
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
+----------------------------------------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED] |
+----------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'jane'@'localhost' IDENTIFIED BY
PASSWORD '*AC57754462B6D4C373263062D60EDC6E452E574D' |
+----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Then,

Oliver:~ chris$ sudo mysqladmin -p shutdown
Password:
Enter password: Oliver:~ chris$ Starting mysqld daemon with databases from /usr/local/mysql/data

Oliver:~ chris$ mysql mysql -u root -p
Enter password: Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.12-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
+---------------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED] |
+---------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'jane'@'localhost' IDENTIFIED BY
PASSWORD '3ac57754462b6d4c' |
+---------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

So, Jane still exists.

Hmmm...  In that case, I have more questions.  Log in as root and run

  SHOW VARIABLES LIKE '%pass%';
  DESC user password;

and post the results.

Also, was this a brand new installation, or an upgrade? If an upgrade, from what version?

Thanks,
C.

Michael


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to