Cannot connect to MySQL remotely

I have a server running Windows 2012 R2, with MySQL 5.7 installed.

I want a specific user to be able to connect to a specific database remotely. I have created that user with '%' in the "from host" setting.

During the installation of MySQL, I requested that port 3306 be opened.

When I try to connect (using MySQL Workbench) to the server, I get an error "Cannot connect to server on xxx.xxx.xxx.xxx (10060)"
Gordon SaxbySenior Web DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ares KurkluSoftware EngineerCommented:
Can you telnet to xxx.xxx.xxx.xxx  3306 ?
arnoldCommented:
During install, the mysql is configured to listen on port 3306, you still need to go through windows firewall advanced settings and add the TCP port 3306 on the incoming rule set to allow the connection in, you. Could add it to the private, public, domain all scope.

At times, even when Windows firewall is off, the absence at times prevents this as well.

Add the rule.

The other, make sure you add an additional user that can connect from anywhere, '%'.
Gordon SaxbySenior Web DeveloperAuthor Commented:
It turned out to be a firewall issue - even though the MySQL install did the firewall update itself!

It had added a Private and a Domain profile, but not a Public one. I added a Public profile and it worked.

Are there any issues with having a Public profile?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

arnoldCommented:
The three are the categories you assign to your network.
Commonly, you want your system to operate and allow access to service when you are on your home, work (private, domain) network
Public if this is a mobile system, means when you connect to other public will be exposed, people would need to find you and then try to .....

The point, commonly, the network classification as public as you noted was the culprit.

The option can be reversed, but recategorizing this network connection as private.
Prabhin MPEngineer-TechOPSCommented:
Hi,
1) telnet the mysql server from remote machine
telnet <IP> 3306
2) If telnet is not happening the can you check any firewall rules are there not? If yes create a inbound rule for port 3306.
3) can you login to mysql server and check 3306 port is opened widely for all host.
4) check whether service is running or not.
 Hope the above steps will help u to resolve this issue.
Gordon SaxbySenior Web DeveloperAuthor Commented:
Found solution myself
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.