HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Administration of MySQL Users

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
administrationusersmysql

Problem

What is the best practice for keeping and maintaining MySQL users? Say for example I have 5 programmers and a PHP application connecting to a database. Should I create 6 different users 1 for each of the users and 1 for the application?

Solution

Can you please clarify Users vs Programmers? Typically this is how it is done:

1) Create three identical schemas and name them PROD, QA and DEV. Their names are self explanatory.

2) Create a dbuser for the application (PHP) use on each of them. If your app is MYAPP, name the dbuser myapp. This is the login the application uses on behalf of every application user.

3) Create a dbuser called dbadmin on each of them and give it to your DBA.

4) Create a dbuser called myapp_dev on each of them and give it to your developers.

Context

StackExchange Database Administrators Q#20349, answer score: 2

Revisions (0)

No revisions yet.