Can't connect to MySQL server on VPS
#1

Код:
[DEBUG] mysql_connect - host: "my vps IP", user: "root", database: "base", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[DEBUG] CMySQLHandle::Create - creating new connection..
[DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[DEBUG] CMySQLHandle::Create - connection created (id: 1)
[DEBUG] CMySQLConnection::Connect - establishing connection to database...
[ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on 'my vps IP' (111)
I get this error when I try launch my server on hosted virtual private server

Код:
#define    MYSQL_HOST        "my vps IP"
#define    MYSQL_USER        "root"
#define    MYSQL_DATABASE    "base"
#define    MYSQL_PASSWORD    "password"

 mysql_log(LOG_ALL);
 mysql = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASSWORD);
what could cause this to happen?
Reply
#2

enable external connections HOST % ANY HOST under root user.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)