MySQL connection always failed!
#1

Hello guys, I'm learning about MySQL and I always get my connection failed.
PHP код:
#define MYSQL_HOST                                    "localhost"
#define MYSQL_USER                                    "root"
#define MYSQL_DATABASE                                "dbbase"
#define MYSQL_PASSWORD                                "123456"
ConnectMySQL(){ 
    
MHandle mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_DATABASEMYSQL_PASSWORD);
    if(
mysql_errno() != 0){
        print(
"[MYSQL] The connection was failed.");
        
printf("[MYSQL] Host : %s | User : %s | Database : %s | Password : %s"MYSQL_HOSTMYSQL_USERMYSQL_DATABASEMYSQL_PASSWORD);
    }else {
        print(
"[MYSQL] The connection was succesful.");
        
//SendRconCommand("exit");
    
}



I am using MySQL 5.5, MySQL Plugin R41-2, the lastest version.
Reply


Messages In This Thread
MySQL connection always failed! - by DuyDang2412 - 28.02.2017, 05:53
Re: MySQL connection always failed! - by X337 - 28.02.2017, 05:59
Re: MySQL connection always failed! - by DuyDang2412 - 28.02.2017, 06:02
Re: MySQL connection always failed! - by Dayrion - 28.02.2017, 06:04

Forum Jump:


Users browsing this thread: 1 Guest(s)