-1

I have no idea how to connect mySQL to amazon EC2 Instance. Here is the screenshot of mySQL workbench: mySQL. I try to change the HostName to the Public IP being provided by the instance, however when i press test connection, it keep promoting this error: Error Message. So what should i do as of now? Thanks!!

2 Answers2

2

Since I cannot put a comment, pardon me for putting this to the Answers Section

Error 10060 is a generic error that means your client cannot reach the server.

  • Try pinging your server IP, if it responds, it is online.

  • Are you sure that the port that EC2 uses is also 3306? Configure your EC2 Instance to allow remote connections. Check the EC2 Security features, something might be blocking you.

  • AFAIK, the root user is only limited to localhost. So it won't work if you use it remotely. Create a new user with the privileges that you only need, then use the '%' wildcard which means any host.

And finally, you may want to try this: Step by Step instructions

Community
  • 1
  • 1
SiNONiMiTY
  • 675
  • 3
  • 14
1

In your EC2 instance you will have a Security Group Column.
Click on that will open the security group page
In the bottom of the page you have a tab called Inbound
Click Edit and then Add Rule to allow port 3306.
In source select anywhere option.

Vijayanand Premnath
  • 3,415
  • 4
  • 25
  • 42