Jump to content

MySQL can't connect locally


mattal999

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/132031-mysql-cant-connect-locally/
Share on other sites

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?

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.