Using Console
Using CLI
gcloud compute instances list
gcloud compute ssh [INSTANCE_NAME]
Replace [INSTANCE_NAME]
with the name of the instance that you identified in step 3.mysqld.cnf
file:sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
#
at the beginning of the line:# bind-address = 0.0.0.0
sudo service mysql restart
exit
With these steps, you have successfully remediated the MySQL port being open on your GCP instance using GCP CLI.Using Python
get
method: