Do I Need More Than One Database "host"...?
Posted by: adhdcelt (---.226.25.8.res.dyn.sal.fibrant.com)
Date: June 03, 2011 04:19PM

I have a wordpress test site running on a WAMP localhost setup.
I noticed that I have two "root" users listed under "Privileges" in the database.
However, the "host" for one is "localhost" and the "host" for the other is "127.0.0.1."

Do I need both of these users?
Should I delete the 127.0.0.1 host user?
Or, should I create a new "user" at "localhost", assign it a password, and delete the two existing ones?

Any help greatly appreciated.

Options: ReplyQuote
Re: Do I Need More Than One Database "host"...?
Posted by: stevenmartin99 (---.21-151.libero.it)
Date: June 03, 2011 04:32PM

Delete every user except

Root. Localhost


Then create a new user for each wordpress

Assign each user to only be able to use 1 db

Don't use root for these

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Do I Need More Than One Database "host"...?
Posted by: adhdcelt (---.226.25.8.res.dyn.sal.fibrant.com)
Date: June 03, 2011 06:37PM

Thanks so much, Steven.
I certainly appreciate your most awesome help here.

This is an area that I STILL find so confusing, so bear with me here for a moment just to make sure I don't $%&! this up.

As I understand it:
1. mysql "users" under "Privileges" in phpMyAdmin are "external" of actual "databases"?
2. "Users" in the individual database "users TABLE" are specific to that DATABASE?
3. So, "Users" in phpMyAdmin and "users" in actual database "users" TABLES are totally different?

So:
When you say "a new user for each WORDPRESS," I assume you mean a new user under the "Privileges" tab in phpMyAdmin for each "wordpress database" or wordpress installation that I have?

And when you say "Assign each user to only be able to use 1 db," I assume you mean "only be able to use one wordpress db"?

And when you say "Don't use root for these," you mean don't assign any "wordpress databases" I have to the root user in the "Database Specific Privileges" area of the phyMyAdmin root user window?

Right now the "root" "localhost" user in the "Database Specific Privileges" area, shows "None" in italics that highlights in green when I mouse over it right above where you can select a database, and "Use text field" reads in that window. Is that what it should look like?

And, should this new user I create be the same name, password, etc. as the "user" in the "users" TABLE of my actual wordpress database, or does it matter?

Options: ReplyQuote
Re: Do I Need More Than One Database "host"...?
Posted by: stevenmartin99 (---.21-151.libero.it)
Date: June 03, 2011 08:37PM

MYSQL users control database

users inside the Database are part of wordpress and have nothing whatsoever to do with the running of mysql



phpmyadmin is a GUI for MYSQL. the users listed in phpmyadmins privilege tab are MYSQL users

when you first install wamp it is best to delete all of these users except for "root localhost"

this will be the master user of MySQL and has full privileges over all Databases


You shouldnt use this root user in your projects.

instead you can create a new user and at the same time at the bottom of the form - create a db for that user

or if you have the db already created... select that db(on the left menu) and then press privileges

then press "add user" and at the bottom of the form you will see "Grant all privileges on database "db name""

this means that root and that user will only have access to the db.


when you are creating a user you will see which privileges you can give the user. normally the app such as wordpress will tell you what privileges the user needs to have the app working correctly.

i dont use wordpress myself but i doubt they need any of the admin privileges.


1 MYSQL user per project is standard to keep things secure. Some projects may have mutiples dbs which is fine.. just link the same user to all of these

if anything goes wrong with these apps then you always have your master user "root" to delete or modify things.

you dont want to give full access to all databases to one of these apps - just incase smiling smiley

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 3 time(s). Last edit at 06/03/2011 08:59PM by stevenmartin99.

Options: ReplyQuote
Re: Do I Need More Than One Database "host"...?
Posted by: adhdcelt (---.226.25.8.res.dyn.sal.fibrant.com)
Date: June 03, 2011 10:05PM

A big WOW.

Thank you so much, Steven, for both your time and your genius.
I'll work on all this and see what I get.

Options: ReplyQuote
Re: Do I Need More Than One Database "host"...?
Posted by: yfastud (Moderator)
Date: June 03, 2011 11:37PM


Options: ReplyQuote


Sorry, only registered users may post in this forum.