I assumed you know how to install your MySQL and run a compute engine instance, here is the stuffs to think about,
- MySQL configuration has a listen set to 127.0.0.1 by default, set it to your IP, or 0.0.0.0
- MySQL user can be setup to localhost, grant all to ‘user’@‘%’, or your IP instead of the %
- Create firewall rules for ingress and egress with the 3306 default MySQL port, with a network tag
- Modify your VM with this two network tag
- Setup the IP of the firewall rule to 0.0.0.0/0 (not recommended), or MYIP/32
That’s it, not much to say, but the checklist can save some time.