Error with MySQL logging
#1

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:

Код:
[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
Mysql_Connect:

Код:
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)
The connection says in the server_log that the connection is succesful. I don't know what to do, please help me!!
Reply
#2

bump
Reply
#3

You sure it should be:
pawn Код:
mysql_connect(values[0], values[2], values[1], values[3]);
and not
pawn Код:
mysql_connect(values[0], values[1], values[2], values[3]);
in the usual numeric ascending order?
Reply
#4

No, that's not the problem
Reply
#5

Bump
Reply
#6

Are you sure you're using the correct .so/.dll plugin that corresponds with the .inc include? Basically, do they both run on the same version of MySQL? I.e. they should both run R5 if it's an R5 server, or R32 if it's an R32 server.
Reply
#7

well i have the right plugins and stuff, but how do i know what kind of server i it, like R5 and stuff?
Reply
#8

Quote:
Originally Posted by Obcido
Посмотреть сообщение
well i have the right plugins and stuff, but how do i know what kind of server i it, like R5 and stuff?
I don't know what the problem is then, doesn't matter about the R5 or whatever stuff. Have you tried running it from somewhere else? I.e. run it from localhost instead of an actual server, or the other way around.
Reply
#9

Well, it works fine on windows, but on my VPS which is linux, is filled with problems...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)