JinYeong Kim
JinYeong Kim

Reputation: 159

An error occurs when connecting to mysql in ec2 instance

Now I am using mysql test server in my company.

An error occurs when connecting to mysql test server in ec2 instance!
This is a result of execution in EC2 instance. enter image description here

This is a result of execution in my house!
I didn't config anything for my house ip in firewall of server!
However, it's no prob. So I think server's firewall is ok!

enter image description here

And It's my security group! enter image description here

Now inbound and outbound allow all things.
I will modify it later and I think security group is not prob. Then, what's a prob????

Upvotes: 0

Views: 49

Answers (1)

matigo
matigo

Reputation: 1461

How did you create the user1 account in MySQL? If it was something like CREATE USER 'user1'@'localhost' ..., then you will not be able to connect remotely. Instead you will need to do this:

CREATE USER 'user1'@'%' ...

Once created, remember to assign privileges to 'user1'@'%', then FLUSH PRIVILEGES; to ensure everything is properly set.

Upvotes: 1

Related Questions