0

I'm running a RHEL7 box, running MySQL-5.7.11 and I'm simply trying to allow remote connections...

I followed the documentation here on opening a port and have done so successfully.

When I run iptables -nL | grep 3306 it outputs:

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 3306


When I try and connect to it mysql -h xxx-xxx-xxxx -u 'username' -pxxxxx I get:

Host 'xxx-xxx-xxxx' is not allowed to connect to this MySQL server

Even though I have allowed permissions to that user for the entire database.

What am I missing?

Jordan Davis
  • 103
  • 3

1 Answers1

2

Network-level issues are not the problem here. You solved those with your iptables rule. Your MySQL grant is a problem, though.

MySQL grants have three parts you need to consider:

  1. username
  2. password
  3. host you're connecting from

It looks like you have #1 and #2 sorted out. #3 is still a problem though. Ensure that your grant allows your user to connect from Host 'xxx-xxx-xxxx'.

EEAA
  • 109,363
  • 18
  • 175
  • 245