Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This would seems to prevent attackers who know that a 'root' user exists?

share|improve this question
    
Exactly would you imagine to gain from that, in relation to having a solid root password? –  andol Jun 7 '10 at 4:52
    
Because having to guess a username and password is twice as hard at just guessing the password? –  Rhubarb Jun 7 '10 at 5:10
    
No, because the username isn't meant to be a secret, hence the system will put much less efforts into hiding/protecting it. If you want to increase the amounts of possible combination you will get a much better effect by simply making your password longer. –  andol Jun 12 '10 at 19:39

1 Answer 1

up vote 6 down vote accepted

Don't remove the MySQL 'root' user, just rename it instead:

mysql> update user set user="somecrazyname" where user="root";
mysql> flush privileges;

I can't rightly imagine what will happen if you go deleting the root user.

share|improve this answer
1  
It wouldn't make any difference for MySQL if you removed the initial 'root' user but you wouldn't be able to create any more databases/tables etc. if your other users don't have the right privileges. –  joschi Jun 7 '10 at 7:41
2  
Just a note here, the database must be specified so you would have mysql> update mysql.user set user=...etc –  IndigoIdentity Feb 22 at 15:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.