Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I created a new mysql user with all the same privileges as the current 'root' user. For security reasons I thought why not create another user for this so people at least won't know the username of my super user.

I then dropped the root user.

Immediately my DB started throwing connection refused errors for all of my other users.

I quickly recreated the original 'root' user and everything magically started connecting again.

My question is then, is it possible to delete the root user in a MySQL database? And if so how?

Thanks.

EDIT 1:

All other security options are in place. We are not just securing our system by trying to remove the root user. We have some over zealous security people here and removing the MySQL root user was just an extra step.

I agree with @Pleun for the reasons I tried to remove it.

share|improve this question

migrated from stackoverflow.com Jul 24 '13 at 2:19

This question came from our site for professional and enthusiast programmers.

6  
Security through obscurity is not security at all... –  Platinum Azure Jul 23 '13 at 20:59
    
@PlatinumAzure : still it is a best practice to choose less common usernames for superusers. –  Pleun Jul 23 '13 at 21:01
1  
Were all your other users connecting as root? –  Bill Karwin Jul 23 '13 at 21:01
1  
@Pleun: On what grounds? –  Platinum Azure Jul 23 '13 at 21:02
2  
Just choose a really strong (long) password for your root user. That should be safe enough. –  mata Jul 23 '13 at 21:18

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.