abhi
abhi

Reputation: 21

Connection between sql workbech on my Laptop and Mysql on Google cloud compute engine (not cloud sql)

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.

Upvotes: 1

Views: 71

Answers (1)

abhi
abhi

Reputation: 21

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

Upvotes: 1

Related Questions