There are many possibilities, and since, in my opinion, you are not providing enough information about the context, I will try to give you an overview from my point of view. I assume that here the most important aspect is the confidentiality of your data and user authentication. Data integrity and availability is much less important.
If you need basic security, you can let MySQL handle it with username and password combinations and set permissions for this account. However, since the mysql access control mechanism is not fine-grained (you can set access control rules only for the table, but not for each row), this will probably lead to the creation of a bad database.
If you want to have a passwordless approach, you can provide users with client certificates and give them the opportunity to verify their identity by presenting their client certificates (use TLS for this) or let them sign something (note that this is a concern because you create the so-called oracle for signing).
Another approach is to encrypt your data in the database. You can do this by deriving the symmetric key from the password and encrypting the credentials with this data. The catch here, of course, should be good, because your key output protocol should be good, and this is not easy (therefore, if you choose this, I advise you to use existing key output protocols or use a stream cipher). Take a look here at the streamcipher list http://en.wikipedia.org/wiki/Stream_cipher .
If you really care about security, you can start thinking about fancy solutions, such as smart card authentication, or a time-synchronized device that is protected against unauthorized access, to create access codes. However, please note that these fancy solutions do not give you free security by implementing such systems if they are complex and expensive (due to deployment and ), however, if everything is done correctly, they provide better security.
Henri
source share