So, I' m trying to connect my MySQL database mainly following this tutorial. I have added one more line in dbconnection.php so to echo a success message. The problem is that if I run php dbconnection.php
through Putty I get the success message, but when I go to http:my-ip
and I press the login button I get an error message Failed to load resource: the server responded with a status of 500 ()
.
I should note that I use Putty for all this. I've also been able to connect to the db in Putty only after I created a user user
with a password password
and hostname my-ip
and granted privileges to my db.
Any suggestions?