Unable to connect to mysql on GCP Compute Engine
P粉312195700
P粉312195700 2023-08-31 10:58:27
0
1
627
<p>I have installed mysql on a virtual machine in gcp using the following command: https://cloud.google.com/architecture/setup-mysql (I installed it manually on the virtual machine)</p> <p>But I can't connect to it using DBeaver. I'm using the external IP provided in the dashboard and I've allowed 3306, but even then I can't connect to it. I keep getting connection refused: 4003 error</p>
P粉312195700
P粉312195700

reply all(1)
P粉265724930

Connection refused: 4003 error

This means that the instance is not listening on the port you are trying to connect to or the firewall is down. In order to fix this error, we need to ensure that the listening process on the virtual machine is running and listening on the correct port. We then verify that Google Cloud Firewall is configured correctly and turned on

You should look for default-allow-ssh to see if your firewall rules allow SSH connections. If firewall and IAP don't solve your problem.

Check if you have access rights. When you add a user and grant permissions to them (or an existing user), you need to specify the hosts or network ranges that the user is allowed to connect to. Follow the steps in this Stack Question and check if you can connect now.

For more information, follow How to Allow Remote Connections to MySQL. Attached SSH troubleshooting documentation.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template