1
votes

Is there anyway to open a port between MySQL workbench running on your local machine to connect MySQL database running on compute engine in google cloud (not cloud SQL)?

I was able to connect it by opening port 3306 on all networks (0.0.0.0/0) under firewall rules. However, I want to restrict it to connect to my laptop only, not all networks. I have a dynamic IP address but I won't mind creating firewall rule every time I connect. Please advise.

1

1 Answers

1
votes

I researched alot, I guess there is no way to allow your laptop dhcp address at googlecloud firewall. I was able to fix this hurdle by ceating ssh tunnel

Windows Source: http://quintagroup.com/services/support/tutorials/mysql-windows

Linux Source: http://quintagroup.com/services/support/tutorials/mysql-linux