Google Compute Engine, error when connecting remotely to MySQL

0

I have an error creating remote access to the MySQL database manager that is hosted on an instance in Google compute Engine

I have an instance in Google Compute Engine using Bitnami where I have an intact MySql , I'm trying to connect remotely, for which create a user in the database as follows

CREATE USER 'usuario'@'x.x.x.x' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'usuario'@'x.x.x.x';
FLUSH PRIVILEGES;

where x.x.x.x corresponds to the public ip of my instance I also opened port 3306 as follows

sudo iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d x.x.x.x --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT

sudo iptables -A OUTPUT -p tcp -s X.X.X.X --sport 3306 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

but when executing:

sudo nmap x.x.x.x 

I do not get port 3306 open, what I need is to connect remotely from heidisql and additional I need to connect the database with Google Data Studio . . p>

Please, I need your help. I've been trying this for two days and you urge me, I would greatly appreciate your help.

    
asked by Naty 02.10.2018 в 19:30
source

1 answer

0

Try creating the firewall rule from the Google Cloud console:

  • Go to link
  • Select "Go to the Compute Engine control panel"
  • Select your instance
  • Select the network interface to configure
  • In the panel on the right, select "Firewall rules"
  • Select "Create firewall rule"
  • Assign a name to the rule, in "Destinations" select "All instances of the network", in "Source IP Intervals" set 0.0.0.0/0 to allow the connection from any IP, in "Protocols and ports "select" tcp "and put 3306
  • Save the rule
  • answered by 02.10.2018 / 20:01
    source