Safest way to read database?

I have a few databases made. Some are for things like weapons and armour, and one is for login information.

I read that for the login information, I should use Json and PHP to Mysql(or other sql). Is that one of the safest ways to access the database? Should I do that will all databases?

OR Should I just have the client request information about the database?

Think about protecting your game servers with a NGINX firewall server in front of them. Set up properly it can be the access point and give you good security.

The choice of what database to use, or to use JSON, PHP etc. isn’t about security. PostgreSQL is a really solid database, but it can be difficult to configure.