Upgrade MySQL 5.5.50 on Debian

Discussion in 'ISPConfig 3 Priority Support' started by SpeedyB, Sep 14, 2016.

  1. SpeedyB

    SpeedyB Member HowtoForge Supporter

    Dear Readers,

    for an Magento 2.1 installation for a client I require a MySQL version equal or greater than MySQL 5.6 or MariaDB equal or greater than 10.0

    Since I have a multiserver setup (Main and 1 slave) I do not think it is wise to try without consulting anyone....

    Will ISPConfig continue to function (and mail etc)?

    Has anyone performed an upgrade of an existing (multi-server) setup, and what are the steps to be taken?

    I saw a tutorial in which you dump all databases, remove mySQL install the new version in several steps. (This is a summary)
    1. mysqldump --all-databases > /tmp/backup.sql
    2. cp /etc/my.cnf /etc/my.cnf.bak
    3. stop mysql
    4. cp -R /var/lib/mysql /tmp/mysql_lib_backup
    5. remove mysql
    6. Install MariaDB-Server-5.5 MariaDB-Client-5.5
    7. Start mysql
    8. Run upgrade script : mysql_upgrade
    9. stop mysql
    10. remove mariadb-server-5.5 MariaDB-Client-5.5
    11. Install mariadb-server-10.0 Mariadb-client-10.0
    12. Start mysql
    13. Run upgrade script : mysql_upgrade
    14. Copy the /etc/my.cnf.bak entries to the new /etc/my.cnf.d/* structure
    15. restart MySQL
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I have not done such an update yet, so I can not share any experience on that topic. ISPConfig should work with MariaDB 10, you just might have to set:

    sql-mode="NO_ENGINE_SUBSTITUTION"

    in my.cnf and ensure that MariaDB is not set to STRICT_TRANS_TABLES mode.
     
  3. SpeedyB

    SpeedyB Member HowtoForge Supporter

    Would it be a problem to update only the main server and not the slave server?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    That should be ok.
     
  5. SpeedyB

    SpeedyB Member HowtoForge Supporter

    I tried the upgrade and succeeded. Everything seems to be working.
    Just a matter of creating a backup (always good)
    apt-get remove MySQL-Server MySQL-Client

    then
    apt-get install MariaDB-Server-10.0 MariaDB-Client-10.0
    Enter a new root password foor MariaDB
    The Debian packager upgrades all databases and converts your my.cnf file.

    service mysql restart
    Everything was working at that moment.

    Debian script enables compatibility by default.
     
    till likes this.

Share This Page