-   Linux - Newbie (
-   -   Duplicate root user in MySQL (

buddhahat 08-29-2004 09:39 PM

Duplicate root user in MySQL
On my new Slackware 10 install I set up mysql with mysql_install_db.

After starting mysql I logged in as root and entered the following query:

mysql> select host, user from user;

which returned the following results:

| host | user |
| darkstar | |
| darkstar | root |
| localhost | |
| localhost | root |

1) Why are there two root users? Do I need both?

2) What is the empty user for and why is that also duplicated?

Thanks in advance for the help.

linux_terror 08-29-2004 09:53 PM

There are two root users because your system can allow logins from other hosts...

your computer knows itself as darkstar(thats one of my boxes names too lol) and in your mysql queries and php configs you can set

$dbhost = localhost


$dbhost = darkstar

and your machine will allow/accept the query...
If you are only going to allow access to the db's from your box then it is safe to remove the darkstar user, but it doesn't hurt anything to leave it there.

hope this helps..


linux_terror 08-29-2004 09:56 PM

oh, and the empty user I do believe is the anonymous user which has no permissions...if i am thinking right you do not want to remove that or you will open a potential security hole.


buddhahat 08-29-2004 09:58 PM

Thanks for the reply linux_terror. That makes total sense.

linux_terror 08-29-2004 10:34 PM

no problem :D Glad to help.

All times are GMT -5. The time now is 10:41 PM.