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.
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 localhost....so 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..
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.
Thanks for the reply linux_terror. That makes total sense.
no problem :D Glad to help.
|All times are GMT -5. The time now is 08:49 PM.|