简体   繁体   中英

Cannot Connect to MySQL Port in AWS Instance

Our local PC cannot connect to MySQL of our AWS instance. Already done the steps mentioned in other stack questions, like setting bind-address to 0.0.0.0 (please see image #1), creating specific user (see image #2) and adding security rule in AWS to allow all connections (see image #3).

I have done anything I thought I could but still I cannot connect to MySQL remotely.

Image #1:

Image #2:

Image #3:

Image #4 在此处输入图片说明

If you are sure that your entries are correct and they look correct. Then you there are some possibilities.

  1. Check if you can connect to the server with telnet telnet yourip 3306 then you should get an result.

  2. Check if have changed the correct security group. Perhaps that group isn't connected to your instance.

  3. I think that should not be the problem but you should check your NACLs if you have some custom rules. Perhaps there is something blocking your connection.

So if you can connect to your MySQL but you can't login then you should check the permissions. And for MySQL changes don't forget to restart the MySQL service.

With netstat -tulpen you can check if the port is open.

sudo grep -R bind /etc/mysql

will show all bind configurations. There could be conflicting .conf file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM