Server doesn't seem to connect to the MySQL database
#1

As the title says, when connecting to the database, it's outputting that the attempt failed.

MySQL Logs
Code:
[22:41:41] [ERROR] "mysql_errno" - invalid connection handle (id: 1)
Script to connect to database
pawn Code:
m_iHandle = mysql_connect(SQL_HOSTNAME, SQL_USERNAME, SQL_DATABASE, SQL_PASSWORD, 3306, true, 2);
   
    switch (mysql_errno(m_iHandle))
    {
            case 0: printf("[SQL] Connection to \"%s\" failed! Please check the connection settings...\a", SQL_HOSTNAME);
            default: printf("[SQL] Connection to \"%s\" passed!", SQL_HOSTNAME);
    }
pawn Code:
#define SQL_HOSTNAME "removed"
#define SQL_USERNAME "removed_jimmy"
#define SQL_DATABASE "removed_newdb"
#define SQL_PASSWORD "removed"
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)