1

I have a user setup to allow outside connections using % access.

Despite that, I get the error

Host blk-x-x-x.isp.com is not allowed to connect to this MySQL server.

  • Have you flushed priviledges or restarted mysql after setting up the `user@%` – Ray May 08 '14 at 19:07
  • possible duplicate of [Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server](http://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server) – Ray May 08 '14 at 19:08
  • I have one user, root@% and thats it, cant connect. –  May 08 '14 at 19:13

1 Answers1

0

I suspect your mysql isn't setup to listen on a TCP port.

In your my.cnf file are you configured to run via socket or TCP port? If socket only, the only local clients can connect to it. Find the port you're on with (assuming you can execute a query, if not assume it's port 3306):

show global variables like "port";

Then check your server to see if that port is actually open. Assuming it's 3306, you'd do this on the command line if you're on unix based system, on windows I'm not sure:

  netstat -tln | grep 3306

If nothing shows up, you're not listing on any port.

Ray
  • 40,256
  • 21
  • 101
  • 138
  • @Wilson is youre server on you local machine? – Ray May 08 '14 at 19:28
  • is there something i can look for in my config file –  May 08 '14 at 19:35
  • @Wilson you need to figure out on windows how to find what ports are open and listening. I think it's somethign like `netstat -a | find "LISTENING"` – Ray May 08 '14 at 19:35
  • @Wilson if you're setup to use a port there will be a line like `port=3306` in your my.cnf (or my.ini) file. Otherwise there will be a line like `socket=/some/path/to/socket` – Ray May 08 '14 at 19:37
  • I found out that the port is 3306. –  May 08 '14 at 19:40
  • @Wilson did your nestat show something listening on that port? – Ray May 08 '14 at 19:44
  • Yes, TCP 3306 is listening –  May 08 '14 at 19:44
  • I'd like to note to im trying to connect directly through my IP on another computer on my network. When I dont use localhost, even on the PC running mySQL, it gives me the same error. –  May 08 '14 at 19:46
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/52333/discussion-between-ray-and-wilson) – Ray May 08 '14 at 19:49