connecting from outside host to mysql xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

connecting from outside host to mysql xampp

Postby new_programmer » 10. March 2006 18:05

Hello guys

Can someone please tell me how to configure mysql in xampp so that I can connect to mysql from a different host

So lets say i have host A that I have xampp installed on

But I want to connect to mysql from Host B to host A.

I can access from Host A fine.. if i use localhost as a host. but when i try to connect from host B by using the ip address of host A i get
"mysql_connect() [function.mysql-connect]: Host 'host B' is not allowed to connect to this MySQL server in C:\Program Files\xampp...."

I have set username password root and gave permissions

Please help

Thanks in Advance
new_programmer
 
Posts: 4
Joined: 10. March 2006 17:59

Postby Wiedmann » 10. March 2006 18:39

I have set username password root and gave permissions

In detail you have a user "root@localhost" in MySQL. But you need a user "root@*".
--> "*" in the host part = allow access from every host.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby new_programmer » 10. March 2006 19:36

Hi thanks for the fast reply

Where exactly can i change root@localhost to root@* ?

I set root username and password from the xampp control panel in security section

thanks
new_programmer
 
Posts: 4
Joined: 10. March 2006 17:59

Postby Wiedmann » 10. March 2006 21:36

With phpMyAdmin or any other MySQL Client (like mysql.exe).

In the MySQL manual you can read anything about usersaccounts...
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby new_programmer » 10. March 2006 22:12

Wiedmann wrote:With phpMyAdmin or any other MySQL Client (like mysql.exe).

In the MySQL manual you can read anything about usersaccounts...


can you please exactly give me the syntax.. or how to do that in phpMyAdmin

Thanks for your help
new_programmer
 
Posts: 4
Joined: 10. March 2006 17:59

Postby new_programmer » 14. March 2006 20:17

Wiedmann wrote:With phpMyAdmin or any other MySQL Client (like mysql.exe).

In the MySQL manual you can read anything about usersaccounts...


Hi

I did as you said from phpmyadmin

But still I get the same error
Host 'Host B' is not allowed to connect to this MySQL server
new_programmer
 
Posts: 4
Joined: 10. March 2006 17:59

Postby cj_nza » 14. March 2006 21:37

The MySQL manual (that was referred to)

http://dev.mysql.com/doc/refman/5.0/en/ ... enied.html

Gives the following information relating to your error:

If the following error occurs when you try to connect from a host other than the one on which the MySQL server is running, it means that there is no row in the user table with a Host value that matches the client host:

Host ... is not allowed to connect to this MySQL server

You can fix this by setting up an account for the combination of client hostname and username that you are using when trying to connect.

If you do not know the IP number or hostname of the machine from which you are connecting, you should put a row with '%' as the Host column value in the user table. After trying to connect from the client machine, use a SELECT USER() query to see how you really did connect. (Then change the '%' in the user table row to the actual hostname that shows up in the log. Otherwise, your system is left insecure because it allows connections from any host for the given username.)
cj_nza
 
Posts: 53
Joined: 06. September 2005 11:49


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 75 guests