I made a db on db4free.net, and I want to connect to it with php:
$username = myusername;
$password = mypw;
$host = \"db4free.net:3306\";
$dbname = mydbna
This may be too late to post an answer to this question.
But I hope this would help anyone who comes searching a solution for a connection failure or access denial just as me.
db4free.net while having database listening on the port 3306, they provide mysql servers on some other ports as well. When creating your account make sure to keep in mind the server you selected.
As in my case, my account was created on their newly set up mysql 8 server and it runs on the port 3307
Don't set the port at the end of the hostname. 3306 is indeed the default port for mysql connection anyway.
This worked for me...
$host = "db4free.net";
I tried using this code and it worked for me
$host = "85.10.205.173:3306";