villermen Posted December 26, 2009 Share Posted December 26, 2009 I don't know if this is the fault of mysql or IIS...I've recently bought and installed a new computer, now I want to host my website on this new one.After much troubling i've managed to run PHP on IIS 7.5.My MySQL server runs fine too, I can log into it with the command line client.Specs:PHP version 5(.3 or .2)MySQL version 5.5IIS version 7.5PHP runs from the pages, all functions seem to work.Now the problem:Whenever I try to connect with my mysql from a php page it can't connect.When I show the mysql_error(), it will output an error in dutch, this is my attempt to translate it:A connection attempt failed because the connected party did not answer correctly after a set time, or the connection failed because the host didn't answer it.The error in dutch is:Een verbindingspoging is mislukt omdat de verbonden party niet correct heeft geantwoord na een bepaalde tijd, of de gemaakte verbinding is mislukt omdat de verbonden host niet heeft geantwoord. I have no idea what the fault here is, to be absolutely sure I didn't do anything wrong, here's the php code I've used: <?php error_reporting(E_ALL);if (!mysql_connect("localhost","root","password"))echo mysql_error();?> Link to comment Share on other sites More sharing options...
Synook Posted December 27, 2009 Share Posted December 27, 2009 Are you sure you've properly connected up your PHP and MySQL installations? More information is available at the MySQL installation manual page on PHP.net. Link to comment Share on other sites More sharing options...
villermen Posted December 28, 2009 Author Share Posted December 28, 2009 Yep, I've followed the exact same page to install and configure. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.