How can I connect to a db4free.net database with PHP?

后端 未结 4 880
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-04 12:05

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         


        
4条回答
  •  生来不讨喜
    2021-01-04 12:45

    Don't set the port at the end of the hostname. 3306 is indeed the default port for mysql connection anyway.

提交回复
热议问题