mattal999 Posted November 9, 2008 Share Posted November 9, 2008 Hi, Basically, I have set up MySQL, PHP5 and IIS. I have got them all installed and configured, and uncommented the lines in php.ini and moved the .dlls, etc. I can't connect to the MySQL server through a php file on the server (internally) but can connect to it externally! I get this error code: 10061 Any ideas? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/132031-mysql-cant-connect-locally/ Share on other sites More sharing options...
wildteen88 Posted November 10, 2008 Share Posted November 10, 2008 What are you using to connect locally/externally. Also post all errors in full here Quote Link to comment https://forums.phpfreaks.com/topic/132031-mysql-cant-connect-locally/#findComment-687152 Share on other sites More sharing options...
mattal999 Posted November 11, 2008 Author Share Posted November 11, 2008 Here is my code: <?php $link = mysql_connect('10.20.30.41', 'root', '*******'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ?> I get the error: Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '10.20.30.41' (10013) in C:\Inetpub\wwwroot\uks51756\iBuziness\includes\connectest.php on line 7 Could not connect: Can't connect to MySQL server on '10.20.30.41' (10013) Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/132031-mysql-cant-connect-locally/#findComment-687809 Share on other sites More sharing options...
trq Posted November 11, 2008 Share Posted November 11, 2008 Does 10.20.30.41 resolve to the server when you ping it from the server? Quote Link to comment https://forums.phpfreaks.com/topic/132031-mysql-cant-connect-locally/#findComment-687816 Share on other sites More sharing options...
mattal999 Posted November 11, 2008 Author Share Posted November 11, 2008 Yes, it does. Any other ideas? I can't seem to find mysqld-nt.exe anywhere on the server or in the list of services though, although I can telnet the server with a community server response. Quote Link to comment https://forums.phpfreaks.com/topic/132031-mysql-cant-connect-locally/#findComment-687821 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.