Remote Access Mysql Amazon Server

1

I am not able to connect to a user for remote access in my database. I have already created the user, I gave permission to access any ip (%) - I already gave permissions on the ip that I am using and even then, only the error: (2003) - Can't connect to MySql (10060) appears when I try connect.

  • I turned off the firewall, checked the installation. Apparently everything is ok.

The server is from Amazon - linux.

I tried accessing mysql through ssh, but it returns the error (2002).

Can anyone help?

    
asked by anonymous 29.05.2014 / 22:35

3 answers

2

MySQL has a configuration file my.cnf this file by default restricts access, making it possible only local access by ip block. Through the following line:

bind-address            = 127.0.0.1

If you comment on this line

# bind-address            = 127.0.0.1

And restarting the database it must respect the privileges that you configured in the database like for example access of any ip '%'. If you have already done this and did not work, you should check what is happening through the MySQL log file.

You can access this tutorial for the purpose to review the procedures you did to allow external access to your database.

    
30.06.2014 / 20:57
0

I suggest you use the Amazon Web Services RDS service. This is the "right way" to manage MySQL databases in the AWS cloud. RDS offers several advantages such as automatic backups, automatic server updates, and an environment configured for this.

    
31.08.2014 / 14:25
-1

In the my.cnf or my.ini file, specify the bind-address on a different port.

port = 10002
bind-address = xxx.xxx.xxx.xxx

The reason for changing the default port is that port 3306 may be blocked on the network. So regardless of releasing the firewall from your server, the network it depends on will not allow it by default.

In bind-address, instead of xxx.xxx.xxx.xxx put the external IP of your server.

Finally, make sure you are editing the correct file. It may happen to have copies of my.cnf in different places and you edit a file that has nothing to do. So you edit, save, restart, and nothing happens. rsrsrs

    
01.07.2014 / 10:13