Thank you guys for the wonderful job you are doing. I just uploaded my website on the the remote server and it brought me back this error message.
Warning: mysq
Or you don't have remote acces privileges on you mysql servers user. Simply change localhost to % will grant root access to public network. Don't forget to flush privileges.
You probably forgot to supply correct username and password to connect to MySQL server. Here mysql_connect("50.28.8.6", "root","")
The problem is you use mysql_real_escape_string()
function first then you connect:
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
mysql_connect("50.28.8.6", "root","") or die(mysql_error()); //Connect to server
Solution is to connect first then use function mysql_real_escape_string()
//Connect to server
mysql_connect("50.28.8.6", "root","") or die(mysql_error());
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
This is because mysql_real_escape_string()
requires the connection.