Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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
Just a note here, the database must be specified so you would have mysql> update mysql.user set user=...etc – Craig van Tonder Feb 22 '14 at 15:16

Your Answer


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.