Pandora FMS Community

Upgrade mysql from 5.7 to 8

Luca · 14 jun 2024, 10:04 · 11 mensajes · 64 visitas

  1. Inicio del debate

    Hello Team,

    i follow this link for update mysql https://pandorafms.com/manual/!775/en/documentation/pandorafms/technical\_annexes/19\_mysql\_8#rocky\_linux\_8almalinux\_8rhel\_8

    When i create a backup with command

    mysqldump -u root -p pandora \
      --skip-add-drop-table \
      --complete-insert \
      --no-create-info> backup_pandora.sql
    

    and at the the end i restore this backup, there are no data.

    Any suggestion?

    Thanks for the support

    BR

  2. Hello Luca,

    When you load up the backup is there any errors when sourcing the .sql file?

    In case it did it means that the new database schema is not in the same version with the one you have.

    In case you are migrating from one version to another, make sure to upgrade first the current database and then proceed to perform the dump again and source in the the new MySQL 8.

    Kind regards,

    Sergio B.

  3. Hi Sergio,

    yes, I am upgrading to mysql version 8. So I just need to upgrade mysql from version 5.7 to 8? The officiate documentation says to remove the old mysql instance first , install the new one and restore the data.
    Can you please be more clear?

    Thank you very much

  4. Hello Luca,

    What I mean is the PandoraFMS version, not MySQL.

    You are trying to upgrade within the same PandoraFMS Server or are you Migrating to a Newer version of PandoraFMS?

    Kind regards,

    Sergio B.

  5. Hi Sergio,

    I am upgrading from version 774 to 775 and it tells me to upgrade mysql to version 8. So I am trying to perform an upgrade within the same PandoraFMS server.

    Thanks

  6. Hi Luca,

    This is because the MySQL 8 compatible backup does not have the same data structure as the database created afterwards.

    I recommend that you update the old database with the RMs to the correct version and re-extract the backup with compatibility.

    Then, in the new environment, recreate the database with the schema of your version and re-insert the backup.

    Best regards,
    Vic.

  7. Hi Vic,

    "I recommend that you update the old database with the RMs to the correct version and re-extract the backup with compatibility."

    How can this be done without losing data?

    Thanks

  8. Hi Luca,

    You have to insert MR into the old DB so that it has the same structure as the current version and recreate the MySQL 8 compatible backup.

    Then, in the new environment, recreate the database with the schema of your version and re-insert the backup.

    The upgrade procedure is correct, but it is necessary that both databases are on the same version of MR so that there are no problems when inserting the data.

    Best regards,
    Víc.

  9. And how can do this ?

    Thanks

Entra en tu cuenta para publicar.