Deleting Users

DROP USER user@host; 

The DROP USER command removes records from the mysql.user table, effectively deleting that user account. Deleting a user does not immediately terminate an active user session, but it does prevent all future connections from being authorized for that username.

The DROP USER command was added in MySQL 5.0.2. In earlier versions of MySQL, you must revoke the user's privileges first, delete the records from user manually, and then issue the FLUSH PRIVILEGES command.

DELETE FROM user WHERE User = 'zak' AND Host = '123.456.78.90'; FLUSH PRIVILEGES; 

MySQL Phrasebook. Essential Code and Commands
MySQL Phrasebook
ISBN: 0672328399
EAN: 2147483647
Year: 2003
Pages: 130

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: