SA-MP Forums Archive
[Plugin] [REL] MySQL Plugin (Now on github!) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] [REL] MySQL Plugin (Now on github!) (/showthread.php?tid=56564)



Re: [REL] MySQL Plugin (****** Project) - NeroX98 - 11.10.2013

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 !!!


Re: [REL] MySQL Plugin (****** Project) - Sp3cter - 11.10.2013

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.


Re: [REL] MySQL Plugin (****** Project) - maddinat0r - 11.10.2013

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)?


Re: [REL] MySQL Plugin (****** Project) - NeroX98 - 11.10.2013

maddinat0r i will try

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


Re: [REL] MySQL Plugin (****** Project) - NeroX98 - 11.10.2013

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)... ?


Re: [REL] MySQL Plugin (****** Project) - maddinat0r - 11.10.2013

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?


Re: [REL] MySQL Plugin (****** Project) - Ahmed10020 - 11.10.2013

YOU ARE AWESOME BlueG !!!


Re: [REL] MySQL Plugin (****** Project) - Kyle - 11.10.2013

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...


Re: [REL] MySQL Plugin (****** Project) - NeroX98 - 12.10.2013

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 !


Re: [REL] MySQL Plugin (****** Project) - maddinat0r - 12.10.2013

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.


Re: [REL] MySQL Plugin (****** Project) - dusk - 29.10.2013

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


Re: [REL] MySQL Plugin (****** Project) - maddinat0r - 29.10.2013

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").


Re: [REL] MySQL Plugin (****** Project) - dusk - 29.10.2013

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



Re: [REL] MySQL Plugin (****** Project) - maddinat0r - 29.10.2013

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.


Re: [REL] MySQL Plugin (****** Project) - dusk - 29.10.2013

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 :/


Re: [REL] MySQL Plugin (****** Project) - maddinat0r - 29.10.2013

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.


Re: [REL] MySQL Plugin (****** Project) - Michalec - 29.10.2013

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


Re: [REL] MySQL Plugin (****** Project) - Sublime - 30.10.2013

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.


Re: [REL] MySQL Plugin (****** Project) - Michalec - 01.11.2013

So can someone help me?


Re: [REL] MySQL Plugin (****** Project) - SupremeCommander - 02.11.2013

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.