I have a Wordpress website hosted on Azure Website. All of a sudden it cannot connect to the database.
http://blog.phowd.com/testdbconnection.php with the code below says "Could not connect: MySQL server has gone away"
<?php
//Modify the hostname, user, password for mysql_connect with the your
//database connection information
$link = mysql_connect('host', 'username', 'pwd');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
I went to Azure portal and checked database status and it says Healthy. 0 connections used.
Any suggestions how to fix it?