Why is my php code not connecting to my remote MySql database?

后端 未结 2 970
天命终不由人
天命终不由人 2021-01-29 11:35

I\'m trying to connect to a remote MySql database and I get this error message:

Warning: mysqli_connect(): (HY000/2002): A connection attempt failed because the connecte

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-29 12:08

    define("DB_USER", "userName");
    

    Try root instead of userName and define DB_HOST.

提交回复
热议问题