php: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it

后端 未结 6 1651
暖寄归人
暖寄归人 2020-12-20 02:33

I have create register and login form using php. And i had took the source from google.

So i have added all the corresponding code, when run index.php.

It sh

6条回答
  •  渐次进展
    2020-12-20 03:05

    didn't you say your mysql port is 3306:

    $db = new PDO("mysql:host=".DBHOST.";port=8889
    //------------------------------------------^
    

    this might help:

    $db = new PDO("mysql:host=".DBHOST.";port=3306
    

提交回复
热议问题