[solved] MP2 with MySQL (1 Viewer)

disaster123

MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Hi

    is it possible to run the whole MP2 server with MySQL? I hate SQLlite - it pretty often does not survive crashes and doesn't scale very well.

    Stefan

    EDIT:
    Just use it with SQLite - it runs fine. Do not expect the behaviours you might have seen using MP1.
     
    Last edited:

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I do not think that DB has been updated to work.
    As for crashing and not survive...
    I have been running it non-stop for 2 years as a tester and user.
    I have done everything including turning off the power during an import of multiple databases and had it not only recover but the code in MP2 allows for it to restart, analize, and pick back up with the imports..... depending on how the importer was stopped.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    is it possible to run the whole MP2 server with MySQL?
    Probably you can (but dunno how long this two year old and unmaintained plugin will be working...)

    I hate SQLlite
    This I can not understand. MySQL is slow as hell compared to SQLite (a db query take at least 5 times as long in MySQL as it does in SQLite), eats up much more resources and is much more unstable than SQLite. We have done lots of testing before we set our "primary" Database Engine and SQLite was the absolut best with a giant gap. I'm using MP2 for more than a year now in daily usage and not a single issue I had was related to the database engine. In the MP1 days I permanently had issues with MySQL, Lots of Database corruptions and most of the time a not started TV server due to way to long starting time of the MySQL server...One of tthe most important improvements regarding stability of the TVE was the change of the db engine...

    We are using SQLite in "Write-Ahead Logging" mode so write access to the db file is limited to a minimum. For this a corruption due to system failures is near to impossible. If the system drive crashes completely then the db is lost too. But this is the same for MySQL In all other circumstances the DB did not get corrupted.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Ah, forgot one thing...
    doesn't scale very well
    This simply is not true. The scaling of SQlite is extremely good. It easily can handle 100.000.000 records without notable lost of speed. If there are performance issues in huge databases it's only because of insufficient drive speed (and that will affect MySQL too).
    The only drawback SQLite has that is is not meant for multiple write accesses at a time. As the MP2 Server is the only process that has the rights to write to the DB, this is no limitation at all...
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Pretty strange my experiences are exactly the opposite. TvSeries and movingpictures sqlite db's are crashing pretty often and i have to start from 0. The MySQL DB from the tvserver hasn't a single crash since around 6 years while i'm using MP.

    So i could hope it's working better under MP2. Thanks.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    TvSeries and movingpictures sqlite db's are crashing pretty often
    Maybe, but afaik they don't use "Write-Ahead Logging" mode ...

    The MySQL DB from the tvserver hasn't a single crash since around 6 years
    For some time I had a batch to repair the MySQL DB in Autostart... But I have to admit that with the change to innodb this was not such an issue any longer.

    I was one of the testers while we were developing the SQlite plugin so I could see the differences "with my own eyes"... We have tried some database engines and after testing we went for SQLite as it was the best available option for the MP2 use case. Fast, reliable and easy to use... I can imagine lots of scenarios (e.g. anything with multi-user accesses) where SQLite definitely is not the best choice, but in this case it is.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    I believe you and i'm ok with using sqlite. Just didn't knew this and i'm familiar with mysql using it at work since nearly 15-20 years...
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    I also was used to MySQL (WAMP and LAMP servers and so on...) and like you I thought SQLite is crap until I saw it in action in MP2. Since then I try to use SQLite (e.G. in MKV-Buddy) as long as it is possible...
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    OK i've to rethink about it. I just got it by using movpic and tvseries and always crashing db's. May be they do something wrong.
     

    Users who are viewing this thread

    Top Bottom