[b]MySQL PData Replacement[/b]
MySQL PData Replacement allows you to synchronise PData between servers, or update it from web tools, like phpMyAdmin, for example. [b]This is only useful for server owners/devs![/b]
[b]Example Uses:[/b]
- Keep kill counters between servers.
- Keep client preferences between servers.
- Keep [url=http://www.facepunch.com/threads/1022682-WIP-PointShop]PointShop[/url] items and points between servers.
[b]Requirements:[/b]
- Knowledge of MySQL and phpMyAdmin.
- Ability to copy and paste.
- IQ above 4.
[b]How To:[/b]
- Run the SQL from the config file in phpMyAdmin (etc).
- Edit config in [b]mysqlpdata_config.lua[/b].
- Join the first server, and run [b]pdata_sql2mysql[/b] to sync the local SQL to MySQL.
- Additional servers just need the config setting.
- RUNNING THE COMMAND ON ADDITIONAL SERVERS WILL OVERWRITE ANYTHING FROM THE FIRST SERVER, WHICH WILL THEN SYNC IT.
[b]To Do:[/b]
- Make it more efficient (not sync everything everytime).
[b]Credits:[/b]
- [url=http://www.facepunch.com/members/3270-andyvincent]andyvincent[/url] - MySQLOO
[b]Download:[/b]
- [url]http://puu.sh/kju9[/url]
Please, do not upload this anywhere else as it will be out of date often.
[b]Enjoy![/b]
Nice work, this should help a lot with writing addons for multiple servers. If I hadn't already written the MySQL backend of my item shop, I probably would have used this.
This is PERFECT.
For every (derma) addon I make for my first server, I need to copy it to my second server, and everyone needs to set up their settings again. So much easier!
I was using tmysql originally, but it only supports one database.
Hmm whats up with the SVN? It seems to be down or broken.
[QUOTE=Crap-Head;25902322]Hmm whats up with the SVN? It seems to be down or broken.[/QUOTE]
Seems alright to me.
You should use Tmysql for threaded queries.
[QUOTE=.kurozael;25911144]You should use Tmysql for threaded queries.[/QUOTE]
Threads are bad if used improperly. I know I had them spiral out of control and spike my cpu up 100%.
And this is used like the normal Player:SetPData( "name" , "info" ) ?
From what I saw all he did was override SetPData and then sync local server with global mysql.
[QUOTE=Aide;25911871]From what I saw all he did was override SetPData and then sync local server with global mysql.[/QUOTE]
You just found the purpose of this addon.
[QUOTE=.kurozael;25911144]You should use Tmysql for threaded queries.[/QUOTE]
Do you people not read what I write?
[QUOTE=_Undefined;25896025]I was using tmysql originally, but it only supports one database.[/QUOTE]
Also, if you hadn't noticed, MySQLOO is threaded.
[QUOTE=.kurozael;25911144]You should use Tmysql for threaded queries.[/QUOTE]
MySQL is threaded and supports Linux.
Two part reply to clarify some comments made in this thread.
[QUOTE=Aide;25911224]Threads are bad if used improperly. I know I had them spiral out of control and spike my cpu up 100%.[/QUOTE]
By that logic Gm_MySql is at fault for creating expensive threads for every query. I decided to use a pool design.
[QUOTE=notRzilla;25913540]MySQL is threaded and supports Linux.[/QUOTE]
I have a build in my repo called "gm_tmysql3_boost" which has a linux build.
[QUOTE=AzuiSleet;25923051]
I have a build in my repo called "gm_tmysql3_boost" which has a linux build.[/QUOTE]
Wait, are we talking about the server or the client binary now :\
[QUOTE=tgp1994;25941112]Wait, are we talking about the server or the client binary now :\[/QUOTE]
Server since their isn't a Linux client (yet :L)
Could someone make a guide how to install it?
im giving this a try
I'm actually working on something similar at the moment. Nice work!
HEY IM having issues with creating the table for playerdata, can you guys help me out a little here
[QUOTE=MadkillerMax;30594709]HEY IM having issues with creating the table for playerdata, can you guys help me out a little here[/QUOTE]
[quote]MySQL PData Replacement allows you to synchronise PData between servers, or update it from web tools, like phpMyAdmin, for example. This is only useful for server owners/devs![/quote]
G-Foce, you didn't help him in any way. This thing doesn't come with any tables or make any tables.
That's what he was pointing out
[QUOTE=Banana Lord.;30629957]G-Foce, you didn't help him in any way. This thing doesn't come with any tables or make any tables.[/QUOTE]
[quote]This is only useful for server owners/devs![/quote]
[QUOTE=G-Foce85;30652166][/QUOTE]
Hey bright one i am a god dang server owner
Im kind of confused what files I need for extra servers, do I just put in the MySQL addon and I do not need the pointshop addon, also do I run the opposite command "pdata_mysql2sql", or do the SQL tables automatically sync, or do they only sync when I run "pdata_sql2mysql"?
hey um I have one server with phpMyAdmin but I have 2 other servers that I dont believe have it, how would I sync it to all 3 servers?
You need to have a MySQL server somewhere, and just the MySQL client (included with this) and the scripts on your garrysmod servers.
ok thank you
I typed "pdata_sql2mysql" twice from the server But srcds says
[lua][mysqlpdata.lua:67] bad argument #1 to 'sub" (string expected, got nil)
[/lua]
What should i do?
Sorry, you need to Log In to post a reply to this thread.