13.02.2015, 21:17
As the title says, when connecting to the database, it's outputting that the attempt failed.
MySQL Logs
Script to connect to database
MySQL Logs
Code:
[22:41:41] [ERROR] "mysql_errno" - invalid connection handle (id: 1)
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"