It is very NOT SAFE for a remote client to access a database via the open Internet. That's what was at the root of the infamous "SQL Slammer" exploit for Microsoft Windows/SQL Server where cashpoint (ATM) machines got hacked right and left - in addition to lots of other damage.
It's more likely that your have a cloud host with a MySQL server available and in that case, apps that also run in that same cloud are OK, since traffic between client and database does not occur over the open Internet - just the cloud LAN (which is often using a VPN isolated from other cloud clients).
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
global solutions you can do at home or in your backyard