LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2004, 09:39 PM   #1
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Rep: Reputation: 15
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.
 
Old 08-29-2004, 09:53 PM   #2
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
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

or

$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
 
Old 08-29-2004, 09:56 PM   #3
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
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.

linux_terror
 
Old 08-29-2004, 09:58 PM   #4
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
Thanks for the reply linux_terror. That makes total sense.
 
Old 08-29-2004, 10:34 PM   #5
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
no problem Glad to help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sarge mysql-server Access denied for user: root@localhost infinity432 Linux - Software 2 05-18-2005 11:42 PM
Starting mysql daemon as user rather than root arubin Slackware 8 05-10-2004 04:03 PM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 04:14 PM
Connect to mysql as non root(linux) user dublinclontarf Slackware 1 02-09-2004 04:19 AM
libnss-mysql (Store your UNIX user accounts in MySQL) markus1982 Linux - Security 0 01-26-2003 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration