Update Rpi2(OpenElec v6) to Rpi3(LibreElec v7) with mysql database ?

  • I wonder if this is possible,
    I got a RPi2 running OpenElec v6 using shared mysql,
    Just bought a RPi3 and installed LibreElec v7 on it and setup everything except the mysql setting.
    If I would copy over the advancedsettings.xml then do a reboot so it would update the database.
    Would this work ?

  • Yes, however I believer there would be an issue with the addon table within the database. We were only able to work around this for the standard sqlite database. So you may have a problem installing new add-ons from the LibreELEC repo


  • Yes, however I believer there would be an issue with the addon table within the database. We were only able to work around this for the standard sqlite database. So you may have a problem installing new add-ons from the LibreELEC repo


    wouldn't this be solved by deleting the AddonsXX.db ?

  • wouldn't this be solved by deleting the AddonsXX.db ?



    Mysql uses a single database with individual tables. Dropping the table would break it because the table will not be recreated.


  • Dropping the table would break it because the table will not be recreated.


    - dropping the data from the addon table would work - but you have to reactivate your addons (make backups)


    - search for old entries *openelec.tv and remove them would also work


    - or translate this into mysql

    Code
    1. sqlite3 $ADDONSDB "DELETE FROM addon WHERE id IN (SELECT idAddon FROM addonlinkrepo a JOIN repo b ON (a.idRepo = b.id) WHERE b.addonID in (repository.openelec.tv))"
    2. sqlite3 $ADDONSDB "DELETE FROM addonextra WHERE id IN (SELECT idAddon FROM addonlinkrepo a JOIN repo b ON (a.idRepo = b.id) WHERE b.addonID in (repository.openelec.tv))"
    3. sqlite3 $ADDONSDB "DELETE FROM dependencies WHERE id IN (SELECT idAddon FROM addonlinkrepo a JOIN repo b ON (a.idRepo = b.id) WHERE b.addonID in (repository.openelec.tv))"
    4. sqlite3 $ADDONSDB "DELETE FROM addonlinkrepo WHERE idRepo in (SELECT id FROM repo WHERE addonID IN (repository.openelec.tv))"
    5. sqlite3 $ADDONSDB "DELETE FROM repo WHERE addonID IN (repository.openelec.tv)"
  • So easiest would be to take out the sdcard from my RPi2 running OpenElec v6.
    Put it in my new RPi3 boot up,
    Copy the update file (LibreElec v7) in to the update folder.
    Reboot and wait till the update is done.
    When done,
    Take out the old sdcard and replace it with the new one that has a fresh copy of LibreElec v7 ?

    Edited once, last by TRaSH ().

  • I thought the addons database was separate to the videos database and the music database and did not use mysql?

  • Little update,
    I did the update by copying the advancedsettings.xml with the mysql info.
    Did a reboot and everything went without any issues.
    Upgraded a RPi1 to a RPi2 from OpenElec v6 to LibreElec v7.(separate mysql for my kid)
    Upgraded a RPi2 to a RPi3 from OpenElec v6 to LibreElec v7.
    And my main HTPC using the mysql database of the RPi3.
    Also tried to add some add-ons and that also worked without any issues.
    Thnx for all the info.

  • I checked my mysql database,
    I couldn't find any references to the add-on database.
    So I think that nickr is right.