In the company I work for, devops engineers (currently only 2 members, who are me and another coworker) are the only people who have access to the production database.
So when any other developers need to execute a MySQL query on the production database. They would send the query to the 2 engineers to let them execute it.
Here are the situations when we need to execute commands to the production database:
The database contains corrupted data, which produce bugs. They execute commands to fix the bugs.
A bug is reported. And they want to see the current values inside the database.
One of our customers wants to modify his/her data. But our web application doesn't have the ability to do the modification. So we have to send MySQL commands directly to the database to complete the customer's requirement.
The QA team created test accounts on the production environment. And they want to change the account's status so that they can do other tests.
This creates a lot of interruptions for me and the other coworker. When we develop programs during the daytime, we often have to switch context just to execute some queries.
I don't think this is a good architecture for the company. How do you control the permissions to the production environment in your company?
Our production database consists of sensitive customer information. If the data were leaked out, our company might be fined for millions of dollars.