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

I just installed MySQL on Debian 6.

With PHPMyAdmin I noticed there are already 4 MySQL users:

debian-sys-maint (localhost)
root             (
root             (localhost)
root             (myhostingcompanyurl)

Are all of those necessary?

share|improve this question
Seems like a dupe of… – Arrowmaster Feb 9 '11 at 22:22
up vote 2 down vote accepted

The answer is "sort of". The debian-sys-maint one is definitely necessary, Debian uses it to perform automatic maintenance like rotating logs.

The three different root accounts are because MySQL treats your host address as part of your account, so even with the same username, you might get a different account depending on how you connect.

'root'@'localhost' is an account using "root" as their username who connects to MySQL via the socket file (eg /var/run/mysqld/mysqld.sock).
'root'@'' is an account using "root" as their username who connects via TCP/IP coming from the IP address.
'root'@'myhostingcompanyurl' is an account using "root" as their username who connects via TCP/IP coming from an IP address that reverse-resolves to myhostingcompanyurl.

If you don't want to have different permissions for people calling themselves root depending on how they connect to the server, you could create a 'root'@'%' account, where % will match any connection's hostname, keeping in mind that you lose security in the case that 'root'@'someforeigncountry' figures out how to connect. Then you could remove the three specific accounts.

You can find out more about how accounts are made up of usernames and hostnames in the mysql documentation here, and the "special meaning" of localhost here.

share|improve this answer
Also note that even if you use 'root'@'%', you still need a separate 'root'@'localhost' if you want to connect through the socket. – Brian Feb 10 '11 at 0:51
Read /usr/share/doc/mysql-server-5.5/README.Debian.gz for more information that any administrator on a Debian based system should know about MySQL. – Anders Jan 2 '15 at 4:54

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.