Upgrading from MySQL to Maria. No MariaDB upgrade option in WHM

TechBill

Well-Known Member
Aug 7, 2011
48
4
58
Is there a way to upgrade from MySQL to MariaDB when there is no MariaDB option in the WHM MySQL upgrade setting?

Thank you
Bill
 

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
Great question @TechBill

I also have a question on this topic,

AlmaLinux 8.5.0 and cPanel 100.0.9 there is no option to select MariaDB at all, I switch from CentOS 7 and cPanel and just went with MySQL 8 while transferring over my cpanel accounts and its working.

--- But, If we do a fresh install of AlmaLinux 8.5.0 and cPanel right now 100.0.9 or even cPanel 102 can we configure cPanel to use MariaDB 10.3 or 4 or 5 instead of MySQL 8?
is there an option to do this or a way to get MariaDB to select from like before ?

Kind Regards,
Spiro
 

TechBill

Well-Known Member
Aug 7, 2011
48
4
58
Hey there! What version of MySQL are you running on the machine?

I have 2 cPanel servers ...

The first one it's running mySQL 5.7 and it does give me the option to upgrade to MariaDB 10.3 ot 10.5 or 10.6 (experimental)

The second one is mySQL 8.0 which is the one I wanted to upgrade to MariaDB first to test it to make sure it's supported by some older php scripts before upgrading it. I do have some new php script I want to install and use however it require MariaDB. I am told that older php scripts will most likely run under MariaDB as well too since it will see it as a mySQL.

I just want to test it first on the second server before upgrading the production server and the second server is showing mySQL 8 and there is no option listed to upgrade it to MariaDB on it like my first server.

it seems like ti ne that once it's at mySQL 8.0 then it can't be upgrade or switch over to MariaDB and the option disappear from list.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
From our docs:

"You cannot upgrade MySQL 8 to MariaDB 10.x due to incompatibilities between these versions. For more information, read MariaDB’s documentation. However, system administrators can choose either MySQL or MariaDB during the cPanel & WHM installation process. For more information, read our Installation Guide."

 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
While I'm sure anything is possible, it probably wouldn't end well, and would cause issues. There's some pretty major internal structure changes between those versions, which is why we made it not possible.

You could always create a new machine that had MariaDB from the start using the details here:

 

TechBill

Well-Known Member
Aug 7, 2011
48
4
58
While I'm sure anything is possible, it probably wouldn't end well, and would cause issues. There's some pretty major internal structure changes between those versions, which is why we made it not possible.

You could always create a new machine that had MariaDB from the start using the details here:

If I create a new machine with cPanel and MariaDB .. Will I be able to export and import DB from MySQL 8 to a new machine with MariaDB?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
From our docs:

"You cannot upgrade MySQL 8 to MariaDB 10.x due to incompatibilities between these versions. For more information, read MariaDB’s documentation. However, system administrators can choose either MySQL or MariaDB during the cPanel & WHM installation process. For more information, read our Installation Guide."

sorry for not specifying correctly. What I meant is that in a fresh install there is no option for MariaDB it’s only MySQL
 

mark135uk

Member
May 7, 2014
11
1
53
cPanel Access Level
Website Owner
" Right - you'd have to specify MariaDB before you even performed the cPanel install if you want that to happen. "

How?
what file do i edit to say i want mariadb instead of mysql, you cant use the whm upgrade as it 404s
i saw a post saying you change a file and put mariadbxxx in place of mysql and then re install whm but i cannot find that post now
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
The file is /root/cpanel_profile/cpanel.config. It will not be present on a newly-installed operating system, so you'll need to create the /root/cpanel_profile/ directory and then the cpanel.config file inside it.

More details on that can be found here:

 

mark135uk

Member
May 7, 2014
11
1
53
cPanel Access Level
Website Owner
hi thanks for your reply, there must be another file, i did it a few days ago on a fresh install, i never made any new docs or dirs, the file was already there
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
This has to be done before the cPanel installation happens. Without cPanel, /root/cpanel_profile will not exist.

You'll need to ask your host for a plain AlmaLinux 8 installation, then create that directory and file, and then manually install cPanel.
 

mark135uk

Member
May 7, 2014
11
1
53
cPanel Access Level
Website Owner
i am now installing centos 7 without cpanel

so to confirm i make /root/cpanel_profile/cpanel.config

add
mysql-version=10.6

save, and then install whm/cpanel and it will install with mariadb and not mysql5.7?