Removing a MySQL user
Many of us have installed a MySQL database as part of a
PHP/MySQL-based web application. Normally this procedure includes
adding a specific user and password for the database:
What the setup guide never tells you is how to remove that user
should you decide to remove the application. You need to see what
grants they have, revoke them, then remove the user from the user table:
mysql> grant all on mynewdb.* to 'idiot'@'localhost' identified by 'guessme'
mysql> show grants for 'idiot'@'localhost'; mysql> revoke all privileges, grant option from 'idiot'@'localhost'; mysql> drop user 'idiot'@'localhost';
- mysql how to delete everything from grants
HOWTO: GRANT privileges in MySQL (-- very detailed, good)
http://kb.mediatemple.net/questions/788/HOWTO%3A+GRANT+privileges+in+MySQL#dv
- mysql how to see who has privileges
http://dev.mysql.com/doc/refman/5.0/en/show-grants.html
http://dev.mysql.com/doc/refman/5.0/en/show-privileges.html
https://dev.mysql.com/doc/refman/5.5/en/privilege-system.html
https://dev.mysql.com/doc/refman/5.5/en/revoke.html
No comments:
Post a Comment