Recently (earlier today), I blogged about how to use PHPMyAdmin with a MDS instance. I also showed at the end of the video that it’s possible to open MySQL Router on the compute instance to connect from anywhere. However this has security risks of course. Therefor, it’s not recommended.
If you want to connect from on-premise to your MDS instance you should use a VPN or a SSH tunnel. Take a look at these previous post:
But if you deploy your application also in OCI and you only need remote access to your MDS instance to manage your database (create schemas, tables, perform some manual queries, …), you can use MySQL Workbench without having to implement any of these solutions as MySQL Workbench integrates SSH as connection method (Standard TCP/IP over SSH).
You only need to connect to your compute instance as this:
If you have deployed your compute instance using a stack in Resource Manager, you can find the key in the outputs:
And that’s it !
You are now connected to your MDS instance from your computer securely without having to open the MySQL ports publicly:
Easy, isn’t it ?
Enjoy MySQL 8.0 on OCI wiht MDS !