Ulysses

Ulysses Stuff => Releases => Topic started by: Beast on September 25, 2015, 05:24:11 PM

Title: Utime - MySQL [UPDATED]
Post by: Beast on September 25, 2015, 05:24:11 PM
NOTE: This is officially outdated. Please use the following version http://forums.ulyssesmod.net/index.php/topic,9320.0.html (http://forums.ulyssesmod.net/index.php/topic,9320.0.html)


It's been quite a while since the last release of a Utime MySQL addon/update, so I decided to bring mine to the table.

What's New?:
- Removed the two pointless table additions (steamid and playername)
- Added color coding for the console messages
- Updated UI to be the same as the normal version

Biggest addition is the ability to upload current data from the server's sv.db file to the MySQL database and have it begin to use the MySQL data.  This works by running a simple console command, and ensures that it is nearly impossible for anything wrong to happen.
Running the command "uploadutime" will begin the process of uploading your data to the MySQL database.

NOTES:
- Doing this will EMPTY your server completely, as well as put a password on it.  This is to prevent any data altercation during upload, ensuring a safer upload.  A password is then placed on the server, and should not be changed to allow joins during the uploading process.  There is also an option to have the server place [MAINTENANCE] before the servers hostname, which will let players know what is going on.
- Once this process is complete, there should be an automated restart triggered by the server, however if it doesn't work for some reason just restart manually when the message about the server restarting appears.
- A safety has been applied to prevent the data from being uploaded multiple times.  If you feel that this data is not fully on there, please restart the server, run the command "utime_cleardb" followed by "utime_continue" then finally "uploadutime". It is advised that if your host crashed, you download the files and do it off a personal server.

Commands:
- uploadutime: This command will begin to upload all of the utime data from sv.db to the MySQL database.  Usually, this is the only one you need.
- utime_cleardb: This command will empty the table of all of its data.  Use this in the case that your server crashes midway during the data upload process.
- utime_continue: This command will remove the limit that prevents multiple runs of the uploadutime command.  Use this following the use of utime_cleardb.

Support:
This addon comes as is, it's up to you to use it right.  In the case that you did not follow instructions properly, and happen to somehow mess up your database, I will NOT fix it for you.  You broke it, you deal with it. 

Installation:
Please install the gm_mysqloo and libmysql dll files accordingly.
https://facepunch.com/showthread.php?t=1220537 (https://facepunch.com/showthread.php?t=1220537) - gmsv_mysqloo.  Read the page to get the libmysql dll as well as proper installation for both.

Once that is done, drag and drop the utime_mysql folder into your addons directory, and remove the previous utime folder.  Once this is done, run the uploadutime command to begin the process.  Run this command only once!

Requirements:
ULib, gm_mysqloo, libmysql

Download:
If you cannot see the download, please sign in or make an account.

IMPORTANT NOTICE: IF YOU DOWNLOADED THE SCRIPT BEFORE 10/10/15 PLEASE IMMEDIATELY APPLY THIS FIX!  THERE IS A HUGE FLAW THAT CAN RESULT IN LOSS OF ALL DATA!

DOWNLOAD THE BOTTOM VERSION OF IT!
Title: Re: Utime - MySQL [UPDATED]
Post by: theGoldTrigger on November 25, 2015, 11:08:13 PM
I feel like you didn't get enough credit for this lol. This is actually really useful thanks!
Title: Re: Utime - MySQL [UPDATED]
Post by: Bite That Apple on November 26, 2015, 12:41:26 AM
Oh snap, wow, can't believe I let this pass my mind. This is a really nice addon. +1 from Dr. Apple
Title: Re: Utime - MySQL [UPDATED]
Post by: Beast on December 13, 2015, 08:03:28 PM
Honestly, I was shocked it didn't get much attention.  I knew that most of the previous versions of the Utime MySQL had a lot of compliments on them, and was amazed I didn't have any comments after a month.
Title: Re: Utime - MySQL [UPDATED]
Post by: Bite That Apple on December 13, 2015, 08:32:45 PM
Garry's Mod itself it dying, thus meaning ulx is dying as well. The lack of visitors to this site is because of the lack of developers for Garry's Mod now a days (committed developers, not darkrp settings.lua editors :p). You're just behind in the times sadly, and if this was released two-three years ago, it would of gotten a lot of attention.
Title: Re: Utime - MySQL [UPDATED]
Post by: Beast on December 13, 2015, 08:37:53 PM
Garry's Mod itself it dying, thus meaning ulx is dying as well. The lack of visitors to this site is because of the lack of developers for Garry's Mod now a days (committed developers, not darkrp settings.lua editors :p). You're just behind in the times sadly, and if this was released two-three years ago, it would of gotten a lot of attention.

Quite unfortunate.  There are so many developers now that will only do work for money, and not ever take a chance to release something for free.
Title: Re: Utime - MySQL [UPDATED]
Post by: Stickly Man! on December 14, 2015, 07:57:24 AM
Hey- Gmod still the top 12 most played game on Steam. Userbase may have changed significantly (definitely a loss of good developers as of late), but we're still sticking around for as long as we can. :P These releases you guys make help us out immensely- users are less likely to switch to a different admin mod if it doesn't have the plugins they want/need. So thank you, and keep up the good work! :)

EDIT: Also, in terms of releases, no news is generally good news. It means you don't have any major bugs!  ;D
Title: Re: Utime - MySQL [UPDATED]
Post by: Beast on December 14, 2015, 12:27:58 PM
Hey- Gmod still the top 12 most played game on Steam. Userbase may have changed significantly (definitely a loss of good developers as of late), but we're still sticking around for as long as we can. :P These releases you guys make help us out immensely- users are less likely to switch to a different admin mod if it doesn't have the plugins they want/need. So thank you, and keep up the good work! :)

EDIT: Also, in terms of releases, no news is generally good news. It means you don't have any major bugs!  ;D

Thankfully I caught my own mistake when writing a later addon.  I forgot to do a check to ensure the command could only be run via rcon, meaning that any player (of any ranking) could delete the database.  Oops...

It didn't have many downloads so that was good I guess.
Title: Re: Utime - MySQL [UPDATED]
Post by: JamminR on December 14, 2015, 06:55:18 PM
Ignoring the 'no one plays Gmod any more' idea, besides Stickly's no news good news thoughts...
SQL on Gmod is a niche market, in any form.
My guess is that there really aren't that many hardcore server owners who take the time to make everything work with SQL on Gmod.
Not saying it's not out here... just saying it's extremely niche and fragmented.
:)
I saw this and I thought 'YES! Nice addition to the 10 I've seen in the past year asking about <anything> Ulib and SQL
Title: Re: Utime - MySQL [UPDATED]
Post by: Beast on December 14, 2015, 08:37:05 PM
Ignoring the 'no one plays Gmod any more' idea, besides Stickly's no news good news thoughts...
SQL on Gmod is a niche market, in any form.
My guess is that there really aren't that many hardcore server owners who take the time to make everything work with SQL on Gmod.
Not saying it's not out here... just saying it's extremely niche and fragmented.
:)
I saw this and I thought 'YES! Nice addition to the 10 I've seen in the past year asking about <anything> Ulib and SQL

I thought it needed more than just a minor change for once. :)
Title: Re: Utime - MySQL [UPDATED]
Post by: Jonzky on February 03, 2016, 05:26:03 AM
Nice addon, thanks for this!

The only suggestion I have is: Add the UNIQUE constraint to the players column and then when uploadutime is called add  ON DUPLICATE KEY UPDATE totaltime=totaltime+" .. tonumber( v[2] ) to the insert query. That allowed me to move all my game servers with different playtimes rather than just a single server.

Title: Re: Utime - MySQL [UPDATED]
Post by: Roomando on February 05, 2016, 01:12:28 AM
This is pretty nice.
Keep up the good work :)