Please Helpme on this,I have copied a live site to a development environment so I can do some testing. I've followed this tutorial to get everything up and running.
When I go to the site is says that there has been an error. The log says the following: "SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
I have multiple other magento instances running on the same machine and they all work. The database is on a different machine.
My local.xml is all correct and when I create a simple php test page which contains the following:
<?php
$mysqli=mysqli_connect("[same data as local.xml]");
if(mysqli_connect_errno()){
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}else{
echo "Connection succesfull!";
}
?>
The page is returning: Connection succesfull!
I've tried: restarting apache2 and php5-fpm, clearing cache and session folder, removing the other .xml
files in /app/etc except local.xml
and config.xml.
Can somebody help me fix this problem? Thanks in advance!