[Plugin] [REL] MySQL Plugin (Now on github!)

Im experiencing big problems with MySQL and OnPlayerConnect function. I'm using R33 plugin on CentOS 6.4 (32bit) machine with (5.5.34 - MySQL Community Server (GPL) by Remi).

My problem is when i have +30 players my OnPlayerConnect is not calling when someone joins on the server. For the first 30 IDs its working perfectly... For those players which OnPlayerConnect isn't called, MySQL cant check their accounts and load them... Also i don't have any errors in server.log and mysql.log

Where is the problem and what code should i post ?
I think there is nothing wrong with my code because its working perfect when there are 25-30 players... The server messes up when there are +30 players... HELP !!!
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Huh, didn't wanted to ask about the server version, I need the MySQL client version. However, I assume that your MySQL server is running on the same machine as your SA-MP server.
The default mysql.so is for MySQL client version 5.1.x.The Linux download includes two .so's: mysql.so (for 5.1) and mysql_5.5.so (obviously for 5.5).
tl;dr: use the mysql_5.5.so
Hmmm , I used the mysql.so , thank you.
Reply

Quote:
Originally Posted by NeroX98
Посмотреть сообщение
Im experiencing big problems with MySQL and OnPlayerConnect function. I'm using R33 plugin on CentOS 6.4 (32bit) machine with (5.5.34 - MySQL Community Server (GPL) by Remi).

My problem is when i have +30 players my OnPlayerConnect is not calling when someone joins on the server. For the first 30 IDs its working perfectly... For those players which OnPlayerConnect isn't called, MySQL cant check their accounts and load them... Also i don't have any errors in server.log and mysql.log

Where is the problem and what code should i post ?
I think there is nothing wrong with my code because its working perfect when there are 25-30 players... The server messes up when there are +30 players... HELP !!!
Can you try different plugin versions, first R34, then R31 (and if you can also R20)?
Reply

maddinat0r i will try

I will try R34 tonight and i will post here...
Reply

Ok It's same... Now i added prints so i saw that onplayerconnect is called, but stops before to load the account with mysql... it stops between the variables when i set them to 0... so can be this related to mysql (because before mysql worked perfectly)... ?
Reply

Quote:
Originally Posted by NeroX98
Посмотреть сообщение
Ok It's same... Now i added prints so i saw that onplayerconnect is called, but stops before to load the account with mysql... it stops between the variables when i set them to 0... so can be this related to mysql (because before mysql worked perfectly)... ?
Can you post the code where it stops?
Reply

YOU ARE AWESOME BlueG !!!
Reply

Quote:
Originally Posted by Ahmed10020
Посмотреть сообщение
YOU ARE AWESOME BlueG !!!
Stop posting random crap, BlueG hasn't updated this plugin in 9 months, it has been another developer working on it...
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Can you post the code where it stops?
Here is my whole OnPlayerConnect:
http://pastebin.com/Rwh5BEcX (Maybe it looks big, but it isn't, textdraws and variables are making it bigger )

pawn Код:
printf("Igrac %d vleze", playerid); // This is called when there are 30+ players... But after this nothing is readed/loaded...
printf("Igrac %d se mu e na 0", playerid); // this is not printed after 30+ players.
So the problem is between the first and second printf function... (There are RemoveBuildingForPlayer functions, Textdraw creations, Checkin name and his properties and setting variables to default (0)... Under the second printf is MySQL (see pastebin).

Please help man, PLEASE !
Reply

Quote:
Originally Posted by NeroX98
Посмотреть сообщение
Here is my whole OnPlayerConnect:
http://pastebin.com/Rwh5BEcX (Maybe it looks big, but it isn't, textdraws and variables are making it bigger )

pawn Код:
printf("Igrac %d vleze", playerid); // This is called when there are 30+ players... But after this nothing is readed/loaded...
printf("Igrac %d se mu e na 0", playerid); // this is not printed after 30+ players.
So the problem is between the first and second printf function... (There are RemoveBuildingForPlayer functions, Textdraw creations, Checkin name and his properties and setting variables to default (0)... Under the second printf is MySQL (see pastebin).

Please help man, PLEASE !
Then comment the code between those 2 printf's out and see if it works. If yes, start partially uncommenting the code again until it doesn't work again. By that time it should be clear what isn't working.
Reply

Thats not seem to be the problem. Just tried it.
Reply

Quote:
Originally Posted by dusk
Посмотреть сообщение
Thats not seem to be the problem. Just tried it.
Try the IP instead of the hostname ("127.0.0.1" instead of "localhost").
Reply

Nop, the error changes accordingly
pawn Код:
(error #2003) Can't connect to MySQL server on '127.0.0.1' (10061)
Reply

Quote:
Originally Posted by dusk
Посмотреть сообщение
Nop, the error changes accordingly
pawn Код:
(error #2003) Can't connect to MySQL server on '127.0.0.1' (10061)
Then you maybe didn't updated the libmysql.dll.
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Then you maybe didn't updated the libmysql.dll.
I re-downloaded it and put it in my server directory. Same error :/
Reply

Quote:
Originally Posted by dusk
Посмотреть сообщение
I re-downloaded it and put it in my server directory. Same error :/
Well, then it should be clear that the problem likely isn't the plugin. Maybe you have to do some additional configurations.
Reply

I have question: how to make function like GetPlayerInt(playerid, field[]) using cache? I don't want to create functions to all my queries.
Reply

Quote:
Originally Posted by dusk
Посмотреть сообщение
Hello,

I can not connect to my MySQL server. Here is the MySQL log:
pawn Код:
[11:55:52] [ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on 'localhost' (10061)
[11:55:53] [ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on 'localhost' (10061)
Mysql connect line:
pawn Код:
DbHandle = mysql_connect("localhost","root","server","");
I'm using WAMP. The server is up and running(green). I connect to phpmyadmin without a password or problems.

I'm using R33 plugin.
In this case, try using free external databases like db4free.net! After you finish registering there, you should know your username/database name/password. Plus, the IP is db4free.net (yes, the site address) so make sure you got it all right

And see if the database is connected. Also, try uninstalling WAMP and use XAMPP and see if it fixes the problem.
Reply

So can someone help me?
Reply

Hi, I've got few questions regarding the latest release (r34)

1) What's the difference between mysql_query & mysql_tquery

2) How to ping database? There is no mysql_ping

3) Is mysql_query threaded?

Thanks.
Reply


Forum Jump:


Users browsing this thread: 25 Guest(s)