Hi Kenny,
Several different options besides your workaround.
You could create the App Service and Azure Database for MySQL Flexible Server separately, which would allow you to have public access to the database server.
You could create a small VM and SSH to that and use the VM to do database tasks as needed. With a VM you would have much more freedom to install/modify things compared to your workaround.
You could set up Virtual Network Gateway which would allow you connect to the virtual network directly from your local machine via Point-to-Site connection.
Please click Accept Answer if the above was useful.
Thanks.
-TP