...

View Full Version : connection problem to other pc in local



zodehala
01-14-2012, 10:59 AM
my ip is 192.168.2.231

my codes

$link = mysql_connect("192.168.2.21","root","123456");

if(!$link){
echo mysql_errno().":". mysql_error();
}


i m getting following error


Warning: mysql_connect() [function.mysql-connect]: Host '192.168.2.231' is not allowed to connect to this MySQL server in D:\xampp\htdocs\tekoser\x.php on line 24
1130:Host '192.168.2.231' is not allowed to connect to this MySQL server

tangoforce
01-14-2012, 02:01 PM
A quick google of "mysql restrict ip" turned up some interesting comments.

It appears you may need to grant each user the privilege of @<ip>


Linky (http://lmgtfy.com/?q=mysql+restrict+ip)

12k
01-14-2012, 05:04 PM
Yupp, that is correct. There are also other ways, but I don't recommend them as they allow WAN connections to mysql which i strongly discourage.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum