Couldn't establish a MySQL connection
#1

Aye

I am getting this error while running my server:
Код:
Connection::Connection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on host (xx.xx.xx.xx) (111)
Pawn code:
PHP код:
    new MySQLOptoption_id mysql_init_options();
    
mysql_set_option(option_idAUTO_RECONNECTtrue);
    
SQL mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSWORDMYSQL_DATABASEoption_id);
    if (
SQL == MYSQL_INVALID_HANDLE || mysql_errno(SQL) != 0)
    {
        print(
"MySQL connection failed. Server is shutting down.");
        
SendRconCommand("exit");
        return 
1;
    } 
The parameters must be correct since I am able to log with these through phpMyAdmin. What could be the issue?
Might it be the fact im using a static Debian MySQL version?
Reply


Messages In This Thread
Couldn't establish a MySQL connection - by ranme15 - 13.02.2018, 20:31
Re: Couldn't establish a MySQL connection - by iKarim - 14.02.2018, 04:45
Re: Couldn't establish a MySQL connection - by ranme15 - 14.02.2018, 05:15
Re: Couldn't establish a MySQL connection - by Lvcnr - 14.02.2018, 05:23
Re: Couldn't establish a MySQL connection - by ranme15 - 14.02.2018, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)