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 installed mysql/phpmyadmin/apache on a linux box for internal network use only. I don't have the strongest understanding of MySQL.

Hostname: server.domain.lan
IP: 192.168.0.54
  • After I installed MySQL I ran mysqladmin -u root password STRONGPASSWORD
  • I edited /etc/my.conf and set the bind-address to 192.168.0.54

I am trying to set up a system to run on my LAN that I can upload websites to that need to create databases.

Screenshot from phpMyAdmin of the Privileges menu:

settings

So my questions are:

  • Why are there 3 root accounts?
  • What do I need to do to configure MySQL to allow remote connections from the root account so I can create databases, etc?

(Sorry I'm kind of new to MySQL so I'm not certain that I'm even asking the correct questions...)

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

root@localhost allows a root user to connect to mysql locally from the DB server using the mysql socket file.

root@127.0.0.1 allows a root user to connect to mysql locally from the DB server using the TCP/IP protocol. (Trust me, you will be needing this one. MySQL has a nasty bug in it. The bug sometimes causes the mysql socket file to disappear rendering root@localhost useless. You will need to connect using root@127.0.0.1 if this ever happens to you)

root@server.domain.lan allows a root user to connect to mysql from server.domain.lan using DNS (Dynamic Naming Services)

You could create root@'%' but I highly recommend you do not.

I would also recommend using a different password for each root user.

share|improve this answer
    
The bug that you mentioned in your answer, is it fixed now? or does it still exist? –  its_me Sep 12 '13 at 18:14
    
@its_me I finally discovered one way to recreate the problem: If you attempt to start mysqld with mysqld already running, sometimes the socket file gets deleted. I have seen other occasions when the socket file was gone without this happening. It's not a MySQL-centric issue. Sometimes, external factors in the OS may also be to blame. –  RolandoMySQLDBA Sep 12 '13 at 18:20
add comment

Your Answer

 
discard

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.