30.07.2014, 16:17
Hey guys, Im wondering a long time why my connection keeps failing as i have the correct information and i can connect to other mysql servers.
(Yep mine is Ubuntu VPS)
Logs doesn't show anything useful that has something to do with the connection problem, Hope some of you might know why this is occurring
(Yep mine is Ubuntu VPS)
Код:
/****** MYSQL DATABASE DEFINES *****/ #define DB_HOST "localhost" #define DB_USER "root" #define DB_PASS "password" //Private Ofc #define DB_ "test"
Код:
public ConnectMySQL() { LogCallback("ConnectMySQL"); mysql_connect(DB_HOST, DB_USER, DB_, DB_PASS); if(mysql_ping()==1) { printf("[MySQL]: Connected successfully to database '%s'", DB_); } else { printf("[MySQL]: Connection failed to database '%s'", DB_); } LogCallback("ConnectMySQL"); return 1; }