Migration from Centos 7 with Mariadb 10.5 to Ubuntu 20.04 with Mysql 8

Operating System & Version
Centos 7
cPanel & WHM Version
110.07

WebSavvyGuy

Active Member
May 10, 2018
31
4
58
China
cPanel Access Level
Root Administrator
I have read that Ubuntu 20.04 comes installed with MYSQL 8 and Cpanel only supports that.

My origin server is currently running Mariadb 10.5 (10.6 is the latest) and i plan to use the transfer tool to move each account to the new Ubuntu server with MYSQL 8.

Will I have any issues with this? I am scared that MYSQL 8 will break things.

Would love to hear any feedback. Thanks.
 
Last edited by a moderator:

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter

quietFinn

Well-Known Member
Feb 4, 2006
2,109
580
493
Finland
cPanel Access Level
Root Administrator
  • Like
Reactions: cPRex

WebSavvyGuy

Active Member
May 10, 2018
31
4
58
China
cPanel Access Level
Root Administrator
You just need to refer to this:

I plan to use my hosts Cpanel/Ubuntu auto installer so i don't think i will have the option of choosing which version. Also, Cpanel does not support anything but Mysql 8 on Ubuntu so I do not want to lose that support.

I am more looking for feedback for anyone who actually has done the switch and has had any impact.

I am now leaning more towards installing AlmaLinux 8 just to avoid any further headaches.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,109
580
493
Finland
cPanel Access Level
Root Administrator
If you install AlmaLinux you must customize the installation as ResellerWiz told, by default MySQL is installed,
 

mtindor

Well-Known Member
Sep 14, 2004
1,530
143
343
inside a catfish
cPanel Access Level
Root Administrator
I plan to use my hosts Cpanel/Ubuntu auto installer so i don't think i will have the option of choosing which version. Also, Cpanel does not support anything but Mysql 8 on Ubuntu so I do not want to lose that support.

I am more looking for feedback for anyone who actually has done the switch and has had any impact.

I am now leaning more towards installing AlmaLinux 8 just to avoid any further headaches.
For what it's worth, I migrated two servers worth of Wordpress accounts and a few other PHP apps like older Joomla (about 250) from CloudLInux 6 ELS with MariaDB 10.3 - 10.5 to CloudLinux 8 with MySQL 8.0.

What you should do is look at what sql_mode= on your MariaDB 10.5 server and then mimic that as best you can on the MySQL 8.0 server. MySQL 8.0 defaults with with sql_mode set to:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

On each server run (as root):

mysql mysql
mysql> show variables like 'sql_mod%';
mysql> quit

You'll see what the current sql_mode options are set to in the running MariaDB/MySQL servers.

None of my MariaDB servers were running with STRICT_TRANS_TABLES or NO_ZERO_DATE or NO_ZERO_IN_DATE or ERROR_FOR_DIVISION_BY_ZERO

So for some accounts I had issues with them after migrating them because the STRICT_TRANS_TABLES (and related options) were set on MySQL 8.0 but not on MariaDB 10.3 / 10.5.

What I ended up doing on MySQL 8.0 was removing STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO

I did that by adding the following to /etc/my.cnf and then doing a /scripts/restartsrv_mysql

sql_mode=ONLY_FULL_GROUP_BY,NO_ENGINE_SUBSTITUTION

You do things how you see fit. I'm just telling you what I did to avoid any issues with STRICT_TRANS_TABLES being enabled. If you have STRICT_TRANS_TABLES enabled on your MariaDB servers, then you will likely have zero issues. If you do not have STRICT_TRANS_TABLES enabled on your MariaDB servers, you probably want to set your sql_mode= in /etc/my.cnf on your MySQL 8.0 to look like mine before you start migrating accounts.

mike
 
  • Like
Reactions: vanessa