Skip to main content

Should it be safe to migrate all accounts from MariaDB 10.3 to MySQL 8 in a shared hosting environment?

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there! For the best outcome, I would recommend reinstalling the system with MariaDB to ensure you have the closest match between systems that you possibly can. That work wouldn't take more than 30 minutes and will make the migration process much smoother. As far as performance, I'm not sure there is really a difference - that has more to do with the server specs and configurations.
    0
  • SimpleSonic
    Setting your preferred database server/version in the config file (/root/cpanel_profile/cpanel.config) and reinstalling cPanel would definitely be recommended. As for performance, in my experience of hosting shared environments, MariaDB 10.x performs much better than MySQL 8 under high loads.
    0
  • cPAdminsMichael
    The supported way would be to reinstall. We have done many version replacements though (i.e. cPanel does not support downgrading MySQL/MariaDB either). dnf remove mysql-community-*
    mv /var/lib/mysql /var/lib/mysql_old
    Replace "mysql-version" parameter in /var/cpanel/cpanel.config with the desired version whmapi1 start_background_mysql_upgrade version=10.3
    ... Which will run an unattended upgrade/install of MariaDB 10.3
    0
  • SimpleSonic
    The supported way would be to reinstall. We have done many version replacements though (i.e. cPanel does not support downgrading MySQL/MariaDB either). dnf remove mysql-community-*
    mv /var/lib/mysql /var/lib/mysql_old
    Replace "mysql-version" parameter in /var/cpanel/cpanel.config with the desired version whmapi1 start_background_mysql_upgrade version=10.3
    ... Which will run an unattended upgrade/install of MariaDB 10.3

    You should probably include a disclaimer not to do the above on a production system with existing accounts/databases. ;)
    0
  • cPAdminsMichael
    You should probably include a disclaimer not to do the above on a production system with existing accounts/databases. ;)

    Well... if people cannot think that they shouldn't REMOVE the data directory on production systems and/or without backup.. then... :-) But you are of course totally right! :-)
    0

Please sign in to leave a comment.