Page 1 of 1

mysqlUnknown MySQL host

Posted: Sat Sep 02, 2006 3:15 pm
by twb
I am new to mysql. In my sql database I have created a user and gave it the host '%' rather than localhost, this is so it will allow any host to connect to it. When I try to connect to the DB with the command "

Code: Select all

mysql -h '%' -u user1 -p userpassword
" I get a "ERROR 2005 (HY000): Unknown MySQL host '%' . I am logged in as the root@localhost when trying to do this. I am sure that I have to modify some particular file but not sure which? Thanks in advance for any help.
Twb


Posted: Sat Sep 02, 2006 3:16 pm
by volka
-h host specifies to which mysql server you want to connect.
And you do not want to connect to the server %

mysql unknown mysql host

Posted: Sat Sep 02, 2006 3:29 pm
by twb
I see, I entered the ip of the server after -h and I works fine.
Thanks for your help