Should it be safe to migrate all accounts from MariaDB 10.3 to MySQL 8 in a shared hosting environment?
Hello,
I need to migrate a CentOS 7 server to Almalinux 8 using the transfer tool. Unfortunately I have forgotten to set the desired rdbms (it would have been MariaDB 10.4) and now it's too late (MySQL 8 came by default and can't change to MariaDB any longer).
1. Should it be safe (I don't want to lose data or needed functions for customers) to migrate from MariaDB 10.3 to MySQL 8 in a shared hosting environment? What I need is to be reasonably sure that the migration will go smoothly.
Or should I reinstall with MariaDB to get a safer migration?
2. Does MySQL 8 offer good performance compared to MariaDB 10.3?
Thanks,
Kind regards!
-
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 -
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 -
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 versionwhmapi1 start_background_mysql_upgrade version=10.3
... Which will run an unattended upgrade/install of MariaDB 10.30 -
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 versionwhmapi1 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 -
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.
Comments
5 comments