MySQL - is my default list of users correct?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

MySQL - is my default list of users correct?

Post by mecha_godzilla »

Hi,

I hope this question isn't too dumb :)

My background is that I can do basic Linux stuff but I don't have much experience configuring the basic (L)AMP applications. I do understand what security measures I need to take but not necessarily the commands to carry them out.

I'm in the middle of administrating a client's server and now have to make sure MySQL is set-up and configured securely. I've created a root password and can log in locally to access MySQL, but when I did

Code: Select all

SELECT host, user, password FROM user;
to list the accounts in the mysql DB it returned five values:

localhost : root : PASSWORD
127.0.0.1 : root : PASSWORD
xx.xx.xx.xx.blah.blah.com : root : PASSWORD (this the address of the server from a reverse look-up)
localhost: :
127.0.0.1 : :

My questions are:

1. Do I need both the localhost and 127.0.0.1 entries for root?
2. When I update root's password, do the three entries all get updated?
3. What's the purpose of the two blank accounts? Can I delete them?

Any links to good info on securing MySQL would be appreciated as well.

Thanks in advance,

Mecha Godzilla
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: MySQL - is my default list of users correct?

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

Re: MySQL - is my default list of users correct?

Post by mecha_godzilla »

Thanks - that's just what I needed :)
Post Reply