17.09.2013, 14:35
The problem is that when you try to login to the server, it won't let you, and it says that your password is invalid. It even says that any player is registered even if the player isn't.
The mysql log says:
Mysql_Connect:
The connection says in the server_log that the connection is succesful. I don't know what to do, please help me!!
The mysql log says:
Код:
[12:59:42] >> mysql_connect(localhost, root, osrp, ******) on port 3306 [12:59:42] CMySQLHandler::CMySQLHandler() - constructor called. [12:59:42] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "osrp" | Username: "root" [12:59:42] CMySQLHandler::Connect() - Connection was successful. [12:59:42] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [12:59:42] >> mysql_ping( Connection handle: 1 ) [12:59:42] CMySQLHandler::Ping() - Connection is still alive. [12:59:43] [ERROR] "mysql_query" - invalid connection handle (ID = 9789868) [12:59:43] >> mysql_store_result( Connection handle: 1 ) [12:59:43] CMySQLHandler::StoreResult() - No data to store. [12:59:43] >> mysql_num_rows( Connection handle: 1 ) [12:59:43] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [12:59:43] >> mysql_retrieve_row( Connection handle: 1 ) [12:59:43] CMySQLHandler::RetrieveRow() - You cannot call this function now. (Reason: Empty Result) [13:00:08] [ERROR] "mysql_query" - invalid connection handle (ID = 9789776) [13:00:08] >> mysql_store_result( Connection handle: 1 ) [13:00:08] CMySQLHandler::StoreResult() - No data to store. [13:00:08] >> mysql_num_rows( Connection handle: 1 ) [13:00:08] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [13:00:08] >> mysql_free_result( Connection handle: 1 ) [13:00:08] CMySQLHandler::FreeResult() - The result is already empty. [13:00:11] [ERROR] "mysql_query" - invalid connection handle (ID = 9770396) [13:00:11] >> mysql_store_result( Connection handle: 1 ) [13:00:11] CMySQLHandler::StoreResult() - No data to store. [13:00:11] >> mysql_num_rows( Connection handle: 1 ) [13:00:11] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [13:00:11] >> mysql_free_result( Connection handle: 1 ) [13:00:11] CMySQLHandler::FreeResult() - The result is already empty. [13:00:11] [ERROR] "mysql_query" - invalid connection handle (ID = 9769848) [13:00:11] >> mysql_store_result( Connection handle: 1 ) [13:00:11] CMySQLHandler::StoreResult() - No data to store. [13:00:11] >> mysql_retrieve_row( Connection handle: 1 ) [13:00:11] CMySQLHandler::RetrieveRow() - You cannot call this function now. (Reason: Empty Result) [13:00:11] >> mysql_fetch_field_row( Connection handle: 1 ) [13:00:11] CMySQLHandler::FetchField(Key) - You cannot call this function now. (Reason: Fields/Rows are empty.) [13:00:11] >> mysql_free_result( Connection handle: 1 ) [13:00:11] CMySQLHandler::FreeResult() - The result is already empty. [13:00:20] [ERROR] "mysql_query" - invalid connection handle (ID = 9770396) [13:00:20] >> mysql_store_result( Connection handle: 1 ) [13:00:20] CMySQLHandler::StoreResult() - No data to store. [13:00:20] >> mysql_num_rows( Connection handle: 1 ) [13:00:20] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [13:00:20] >> mysql_free_result( Connection handle: 1 ) [13:00:20] CMySQLHandler::FreeResult() - The result is already empty. [13:00:20] [ERROR] "mysql_query" - invalid connection handle (ID = 9769848) [13:00:20] >> mysql_store_result( Connection handle: 1 ) [13:00:20] CMySQLHandler::StoreResult() - No data to store. [13:00:20] >> mysql_retrieve_row( Connection handle: 1 ) [13:00:20] CMySQLHandler::RetrieveRow() - You cannot call this function now. (Reason: Empty Result) [13:00:20] >> mysql_fetch_field_row( Connection handle: 1 ) [13:00:20] CMySQLHandler::FetchField(Key) - You cannot call this function now. (Reason: Fields/Rows are empty.) [13:00:20] >> mysql_free_result( Connection handle: 1 ) [13:00:20] CMySQLHandler::FreeResult() - The result is already empty. [13:00:20] [ERROR] "mysql_query" - invalid connection handle (ID = 9768644) [13:00:20] >> mysql_store_result( Connection handle: 1 ) [13:00:20] CMySQLHandler::StoreResult() - No data to store. [13:00:20] >> mysql_num_rows( Connection handle: 1 ) [13:00:20] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [13:00:20] >> mysql_free_result( Connection handle: 1 ) [13:00:20] CMySQLHandler::FreeResult() - The result is already empty. [13:06:16] >> mysql_close( Connection handle: 1 ) [13:06:16] CMySQLHandler::~CMySQLHandler() - deconstructor called. [13:06:16] CMySQLHandler::FreeResult() - The result is already empty. [13:06:16] CMySQLHandler::Disconnect() - Connection was closed. [13:06:16] Unloading Plugin
Код:
if (fexist("mysql.ini")) { new File: file = fopen("mysql.ini", io_read); if (file) { new read[128], values[4][32]; fread(file, read); split(read, values, '|'); printf("[MySQL] Connecting to '%s'...", values[0]); mysql_connect(values[0], values[2], values[1], values[3]); if (mysql_ping() != -1) { printf("[MySQL] Connected to '%s' successfully.", values[0]); } else { printf("[MySQL] Connection to '%s' failed!", values[0]); SendRconCommand("exit"); return 0; } } }
Код:
mysql_query(query)
