...I think maybe a second layer of code between server and database is still safest way instead of giving your server exe direct SQL access.
Using this you will have to make sure to isolate all game code under #if WITH_SERVER directives to make sure this code will not be sitting in client's desktop ever....
https://forums.unrealengine.com/showthread.php?120792-MySQL-Connector-UE4-Plugin-is-available-for-all-now&p=583731&viewfull=1#post583731