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?
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.