Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Upgrade mysql from 5.7 to 8

  • Sergio

    Administrator
    June 14, 2024 at 10:27
    1247 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • Luca

    Member
    June 14, 2024 at 10:32
    429 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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

  • Sergio

    Administrator
    June 14, 2024 at 10:59
    1247 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

    • Luca

      Member
      June 14, 2024 at 11:30
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      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

  • vic

    Administrator
    June 14, 2024 at 11:09
    1516 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

    • Luca

      Member
      June 14, 2024 at 11:32
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      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

  • Luca

    Member
    June 14, 2024 at 12:02
    429 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I follow this documentation https://pandorafms.com/manual/!775/en/documentation/pandorafms/technical_annexes/19_mysql_8#rocky_linux_8almalinux_8rhel_8.

    But when reimport data generate form this command:

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

    The agents disappears

  • vic

    Administrator
    June 14, 2024 at 14:31
    1516 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

    • Luca

      Member
      June 14, 2024 at 14:40
      429 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      And how can do this ?

      Thanks

  • vic

    Administrator
    June 17, 2024 at 09:45
    1516 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Luca,

    The implementation of the MR is in our upgrade documentation, so the migration procedure to MySQL 8 is the same.

    https://pandorafms.com/manual/!current/en/documentation/pandorafms/installation/02_anexo_upgrade#major_update

    Best regards,
    Víc.