wowphp Posted February 25, 2007 Share Posted February 25, 2007 $link = mysql_connect('127.0.0.1:3307', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); this works but when i use my real ip: 65.28.243.16 it won't work, I have set up my routor. Then I tired my lan ip, no work ERROR: Can't connect to MySQL server on '198.168.123.112' (10061) so do i have to enable it in mysql to aloud it to work? Quote Link to comment Share on other sites More sharing options...
btherl Posted February 25, 2007 Share Posted February 25, 2007 It may also be your firewall preventing access. If you have any firewall software installed, try disabling it for a moment to test it (or enabling access to port 3307). Another thing to try is running "telnet 198.168.123.112 3307" from the command prompt (that's Start -> Run in XP). If the connection fails, then either it is being blocked, or the server is configured not to accept connections on that IP. Unfortunately I can't help with getting the server to accept connections if it doesn't, since I'm not that familiar with mysql. Quote Link to comment Share on other sites More sharing options...
wowphp Posted February 25, 2007 Author Share Posted February 25, 2007 I had to let the user use any host. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.