03.05.2016, 04:30
Hi all. I am very new at this and I don't know how to fix the following problem. Each time when I start up the server and check mysql_log.txt, there appears this:
Maybe that's because of some mistake at GameModeInIt? Well, this is how it looks like,
Also I use MySQL plugin R34.
Please help me to solve this problem! Thank you in advance.
Код:
[05:28:42] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'zsampstar1'@'localhost' (using password: NO) [05:28:42] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'zsampstar1'@'localhost' (using password: NO) [05:28:42] [ERROR] "mysql_errno" - invalid connection handle (ID = 0) [05:28:42] [ERROR] "mysql_tquery" - invalid connection handle (ID = 0) [05:28:42] [ERROR] "mysql_tquery" - invalid connection handle (ID = 0)
PHP код:
public OnGameModeInit()
{
print("====================="R_COD_NAME" "VERSION"=====================");
mysql_log(LOG_ERROR | LOG_WARNING);
mysql_connect("127.0.0.1", "zsampstar1", "codsamp", "", 3306, true);
if(mysql_errno(g_pSQL) != 0)
{
print("#Failed to connect to MySQL db");
print("====================="R_COD_NAME" "VERSION"=====================");
SendRconCommand("exit");
return 1;
}
print("#Connected to MySQL db");
Please help me to solve this problem! Thank you in advance.