i want to access database in google cloud server via TCP Forwarding, I have username = root password = my-password , server-name
i am doing:
- Set TCP Forward in cloud server
gcloud compute start-iap-tunnel sg01dbcluster-node-2 3306 --local-host-port=localhost:3307 --zone=asia-southeast1-b
output :
Listening on port [3307].
- Then i connect to database server using mysql workbench hostname localhost port :3307 username : root password : my-password
but i have error:
Failed to Connect to MySQL at localhost:3307 with user root
Lost connection to MySQL server at 'reading initial communication packet', system error: 0
any idea what step that i missed ?