Web Hosting Talk







View Full Version : MySQL Database Names and Usernames


EGS
08-19-2007, 10:19 PM
Hi...I have a question regarding MySQL database names and usernames that I haven't really ever thought about before.

Is it "okay" to have/use identical database names and usernames? I am currently doing it because I did it by accident...it works fine and everything, just wondering if that is a security flaw or something that you're not supposed to do?

For example, say you have a database with the name of archiveindex and then you make a user for that database with the same name of archiveindex.

Is this okay??

Azavia
08-19-2007, 10:21 PM
Yep, it's fine as far as I know. Just be sure to only enable the privileges that the user requires for that database, as you should do for all users.

dollar
08-20-2007, 12:49 AM
I do this on the majority of my databases and I have yet to have any issues.

Steve_Arm
08-20-2007, 02:09 AM
I would say it's should be a must. This way you know who user is for which database.