I can access mySQL server with phpMyAdmin and with command line, but when I acces any of my webs mySQL is not responding at all.
I use this function to open connection to the mySQL server (it worked with PHPTriad):
- Code: Select all
function OpenConnection()
{ $server="localhost";
$username="root";
$password="";
$db="experiment";
$conn = mysql_Connect(localhost,$username,$password);
$res = mysql_Select_DB($db,$conn);
if(!$res)
{ echo "<p>Error in selecting the active DB...</p>";
}
return $conn;
}
$connection = OpenConnection();
$sql = "<sql query>";
$response = mySQL_Query($sql, $connection);
echo mySQL_error();
It writes no error, but no SQL querries work...
I just installed XAMPP, ran Apache and mySQL from Control Panel and secured XAMPP pages, added password for root in mySQL (then i removed it via phpMyAdmin to try if this was not causing the problem).
I would be grateful for any suggestions.