PDA

View Full Version : "Host "xxx.xxx" not allowed to connect to this MySQL server"


uwfrog
3rd July 2006, 13:18
I am trying to set up a MySQL server on ubuntu behind a router, following this great setup tutorial. The server has been set up running on my machine on port 3306. I also let the router forward (TCP and UDP requests) from port 3306 to my machine.

But when I tried to connect MySQL server, by

mysqladmin -h 70.24.xx.xx -u root passowrd myrootsqlpassword

it returns "mysqladmin: connect to server at '70.24.xx.xx' failed
error: 'Host 'randomcharacterstrings.yyy.net.cable.zzzzz.com' is not allowed to connect to this MySQL server'
"

Here, 70.24.xx.xx is the external IP of my router. And I am guessing the Host 'randomcharacterstrings.yyy.net.cable.zzzzz.com' is the name that My ISP uses (the name of my router?).

Any ideas of what the problem is?

Thanks!

falko
4th July 2006, 00:14
You must use the hostname that is listed in the mysql.user table in the MySQL database. You can also change the hostname there or put % instead of a hostname there (% allows connections with all hostnames). Restart MySQL afterwards.