Problem connection mysql r41-3
#1

Hello guys, i have a problem. This problem is connection to localhost.
I have 1 warning(in warning log(mysql)) and 4 errors(in errors log(mysql))
Warning:
Code:
[17:31:15] [plugins/mysql] mysql_connect: no password specified (D:\GM\gamemodes\GM.pwn:23970 -> D:\pawno S\pawno\include\afk.inc:73 -> D:\pawno S\pawno\include\YSI\y_hooks/impl.inc:483)
I don't have a password, because i use it localhost.
And errors:
Code:
[17:31:15] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[17:31:15] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[17:31:15] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[17:31:15] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
I updated the plugins and logs to R41-3
Connection code
Code:
handle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);

Details for mysql_host, etc:

#if defined Server1
	#define MYSQL_HOST 		""
	#define MYSQL_USER 		""
	#define MYSQL_PASS 		""
	#define MYSQL_DB		""
#endif
#if defined Server2
	#define MYSQL_HOST 		"localhost"
	#define MYSQL_USER 		"root"
	#define MYSQL_PASS 		""
	#define MYSQL_DB		"testx"
#endif
Reply
#2

UP!!
Reply
#3

UP, I put it OnQueryError and I have errors:

Errors:
Code:
[19:02:18] Error ID: 2013 | Callback: LoadCars
[19:02:18] Error: Lost connection to MySQL server at 'reading authorization packet', system error: 10060 | Query: SELECT * FROM `cars`
And function:
Code:
mysql_tquery(haft, "SELECT * FROM `cars`", "LoadCars", "");
Reply
#4

UP!!
Reply
#5

UP!!
Reply
#6

Try this.

PHP Code:
handle mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSMYSQL_DB);
Details for mysql_hostetc:
#if defined Server1
    #define MYSQL_HOST         ""
    #define MYSQL_USER         ""
    #define MYSQL_PASS         " "
    #define MYSQL_DB        ""
#endif
#if defined Server2
    #define MYSQL_HOST         "localhost"
    #define MYSQL_USER         "root"
    #define MYSQL_PASS         " " // SPACE IF NO PASS
    #define MYSQL_DB        "testx"
#endif 
Also, why you have not filled up MYSQL_HOST, MYSQL_USER, MYSQL_DB and MYSQL_PASS in Server1? It's totally unnecessary, remove the whole of Server1.
Reply
#7

Server1 is for host, server2 is for localhost

Edit:

That's the same thing I do, the same problems
Reply
#8

Quote:
Originally Posted by skuller12
View Post
UP, I put it OnQueryError and I have errors:

Errors:
Code:
[19:02:18] Error ID: 2013 | Callback: LoadCars
[19:02:18] Error: Lost connection to MySQL server at 'reading authorization packet', system error: 10060 | Query: SELECT * FROM `cars`
And function:
Code:
mysql_tquery(haft, "SELECT * FROM `cars`", "LoadCars", "");
can you share with us your LoadCars() callback?
Reply
#9

Code:
function LoadCars()
{
	new Personal_Vehicles = cache_num_rows(), id;
	for(new i = 0; i < Personal_Vehicles; i++)
	{
		cache_get_value_name_int(i, "ID", id);
		cache_get_value_name_int(i, "ID", C_DATA[id][cSQLID]);
		cache_get_value_name_int(i, "UserID", C_DATA[id][cUserID]);
		cache_get_value_name(i, "Owner", C_DATA[id][cOwner], MAX_PLAYER_NAME);
		cache_get_value_name_int(i, "Model", C_DATA[id][cModel]);
		cache_get_value_name_int(i, "Color1", C_DATA[id][cColors][0]);
		cache_get_value_name_int(i, "Color2", C_DATA[id][cColors][1]);
		cache_get_value_name_float(i, "PosX", C_DATA[id][cPos][0]);
		cache_get_value_name_float(i, "PosY", C_DATA[id][cPos][1]);
		cache_get_value_name_float(i, "PosZ", C_DATA[id][cPos][2]);
		cache_get_value_name_float(i, "PosA", C_DATA[id][cPos][3]);
		cache_get_value_name(i, "Plate", C_DATA[id][cPlate], 10);
		cache_get_value_name(i, "CarName", C_DATA[id][cDesc], 30);
		cache_get_value_name_float(i, "KM", C_DATA[id][cKM]);
		for(new m = 0; m != 17; m++)
		{
			format(gString, 8, "Mod%d", m);
			cache_get_value_name_int(i, gString, C_DATA[id][cMods][m]);
		}
		cache_get_value_name_int(i, "PaintID", C_DATA[id][cPaintID]);
		cache_get_value_name_int(i, "Owned", C_DATA[id][cOwned]);
		cache_get_value_name_int(i, "Locked", C_DATA[id][cLock]);
		cache_get_value_name_int(i, "Days", C_DATA[id][cDays]);
		cache_get_value_name_int(i, "Fuel", C_DATA[id][cFuel]);
		cache_get_value_name_int(i, "Insurance", C_DATA[id][cInsurance]);
		cache_get_value_name_int(i, "Price", C_DATA[id][cPrice]);
		cache_get_value_name_int(i, "Neon", C_DATA[id][cNeon]);
		cache_get_value_name_int(i, "Spawned", C_DATA[id][cSpawned]);
		if(C_DATA[id][cSpawned] != 0) C_DATA[id][cSpawned] = 0, cUpdate(id, cSpawnedx);

		Total_P_Vehs = id;
	}
}
Reply
#10

hmm, the callback is seems to be fine can you disable your firewall and try again? also what's MySQL Server are u using? "XAMPP" or ..?
Reply
#11

I use XAMPP

Edit:

We also deactivated security and it does the same
Reply
#12

Quote:
Originally Posted by skuller12
View Post
I use XAMPP
did you disabled your firewall and tried again?
Reply
#13

We also deactivated security and it does the same
Reply
#14

Downgrade and test again with R41 plugin (we need more info)
Reply
#15

The MySQL R41-2 works perfectly .. on the R41-3 not ...
Reply
#16

Quote:
Originally Posted by skuller12
View Post
The MySQL R41-2 works perfectly .. on the R41-3 not ...
so keep using R41-2 version, and open an issue out here https://github.com/pBlueG/SA-MP-MySQL/issues to alert Dev's of this plugin

because of this bug has nothing to do with your code. its only bettwen mysql plugin and mysql server sides
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)