
January 17th, 2003, 12:54 PM
|
|
Junior Member
|
|
Join Date: Jan 2003
Location: Cleveland OH USA
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Initial MySQL users: localhost vs. "hostname"
I have just set up MySQL and the phpmyadmin script and I would like to add some users and do some other administrative tasks to assure security. Above all, I want to make sure no user (or php script) will have access to any databases without a user name and password.
Right now if I look at the list of users, I see:
Any "hostname"
root "hostname"
Any localhost
root localhost
1. What's the difference between "hostname" users and localhost users? Why are there two? Is one of them safe to delete? If so, which one ("hostname" or localhost)? (If it's of any relevance, I only plan on accessing the databases through SSH sessions to the host machine on which the MySQL server is running, and through PHP scripts also running on the same host machine.
2. If there IS a difference, when I create new users, do I need to
create two of each? I.e.,
newuser1 "hostname"
newuser1 localhost
3. What's the deal with the Any users? Why do they exist? Can I delete them? Like I said, I don't want anyone to have access to the databases without a MySQL username and password.
I've searched the documentation and the web for answers, but I can't seem to find what I'm looking for. Thanks to you if you can help, and you rock.
|