Securing a MySQL database with more than just username and password We have a web app that runs in Azure and use a MySQL database, also in Azure, for its data storage. We store PII data from the various companies that use our system in this database.

The web app is written in PHP and connects to the database using a username and password. We are needing to comply with a big customers data protection requirements, and they require any access to PII data to be 2-factor authenticated.

I have no idea where to start with this or if it is even possible. Does this mean for every connection the web app makes (tens of thousands a minute), it would need to some how generate a 2-factor code as well each time??? Assuming adding 2-factor is even possible for a MySQL server??(I have looked around and can't find anything).

So my questions are:


Is 2-factor possible with MySQL 
If not, how else can it be
secured so it requires more than just a username and password to
connect (that me using workbench, and our web app can do).


Thanks
Here are some basic security recommendations.


Set complex password.
Use validate_password plugin.
Disable remote root login.
Disallow incoming traffic apart from your app and report server.
Always create users with the proper host(don't use '%').
Rotate password at every month.
Restrict MySQL data, log and backup directories.
Try to implement SSL communication between the server and the clients.
Restrict SSH access to the server where MySQL installed.
Prevent my.cnf from other users.


This blog may help you to implement more security: 

https://lalitvc.wordpress.com/2017/04/02/basics-of-mysql-administration-and-best-practices/