sourcecode

Thursday, June 28, 2012

Delete default MySQL anonymous account

http://bytes.com/topic/mysql/answers/77983-how-delete-guest-user
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

There is a default anonymous (empty user name) in MySQL: ''
You get logged into this account when you type:
#mysql
and you are now using user name '' with no privileges everywhere.
which would be some careless mistake, instead of typing the right command:
#mysql -u lightnight -p

So, how to delete this ghost account? log in with root (or others with admin privileges):

>use mysql;
>delete from user where User='';
>delete from db where User='';
>flush privileges;

/************END*****************/  

No comments: