1

I have a MySQL database on google cloud. I have allowed all IPs to be able to access it in the authorization settings. When I try to connect to it using MySQL workbench on my home internet(or any non-work place internet) it connects fine however when using my workplace internet, I get the following error:

Lost connection to MySQL server at 'reading initial communication packet', system error: 0

How can I solve this? What could be preventing access to the database using work internet?

EDIT 1:

Port used is 3306

Dharman
  • 30,962
  • 25
  • 85
  • 135
machazthegamer
  • 593
  • 8
  • 18
  • How are you connecting at work? Which port are you using? Note that you probably don't want to open your database to all IPs, just open it to the IP of your app running in the cloud which needs to talk to the database. – Tim Biegeleisen Jun 22 '18 at 04:15
  • I am slightly confused with regard to whether your external app is having problems connecting to Cloud SQL or you are having problems connecting to the database using Workbench from your working computer. In any case, have you had a look at this StackOverflow post - https://stackoverflow.com/questions/5755819/lost-connection-to-mysql-server-at-reading-initial-communication-packet-syste ? It might be a problem with the firewall that you have on your workplace internet. – Philipp Sh Jun 22 '18 at 10:04
  • Connection is through MySQL workbench not an app – machazthegamer Jun 22 '18 at 13:54
  • Have you been able to confirm this is not a firewall issue? – Christopher P Jul 02 '18 at 09:28

1 Answers1

0

It was a firewall issue. I confirmed this with the IT department. If anyone else has this problem I would recommend doing the same.

machazthegamer
  • 593
  • 8
  • 18