SOLVED MySql and PHP upgrade

audrey

Well-Known Member
Oct 18, 2006
114
5
168
Hi

I need to upgrade MySql and PHP on my servers.

>>>>>>>>>>>>>>>>>>>>>>>

Cpanel's documentation says

1) We strongly recommend that you back up your database before you upgrade your database or change to MariaDB.
Is this backup a special backup or is this just the regular WHM backups including "Per Account and Entire MySQL Directory"


2) If the buildapache application uses the MySQL libraries and headers on the server itself, and you change the MySQL version, Apache cannot function correctly. Because cPanel & WHM updates MySQL RPMs whenever Red Hat releases updates, this could automatically break thousands of servers within a few hours. For this reason, cPanel, L.L.C. always builds Apache and PHP with the -builtin option.

My servers all have standard intalls of Cpanel. No custom scripts. How can I tell if the above will be an issue for the mysql upgrade.

>>>>>>>>>>>>>>>>>>>

Is it better to upgrade MySQL in Cpanel version v80.0.24 or v82.0.11

>>>>>>>>>>>>>>>>>>

I also need to add PHP 7.3 to the servers.
Does upgrading MySql automatically upgrade PHP
if not
Is it better to upgrade MySql first and then PHP or vice versa?

Thanks for your help

Audrey
 

quietFinn

Well-Known Member
Feb 4, 2006
1,394
179
193
Finland
cPanel Access Level
Root Administrator
I don't think it matters in what order you do those, but I'd suggest you do like this:
1st upgrade Cpanel/WHM to v82.x
2nd add PHP 7.3 in EasyApache
3rd Upgrade MySQL

Only the MySQL upgrade can be a bit scary, but I don't remember ever having any problems with it.
Anyway it's better to do when server is not busy because during the upgrade MySQL server will be down for a short while.
 

audrey

Well-Known Member
Oct 18, 2006
114
5
168
Thanks for your advice

any idea on the following?
Cpanel's documentation says

1) We strongly recommend that you back up your database before you upgrade your database or change to MariaDB.
Is this backup a special backup or is this just the regular WHM backups including "Per Account and Entire MySQL Directory"


2) If the buildapache application uses the MySQL libraries and headers on the server itself, and you change the MySQL version, Apache cannot function correctly. Because cPanel & WHM updates MySQL RPMs whenever Red Hat releases updates, this could automatically break thousands of servers within a few hours. For this reason, cPanel, L.L.C. always builds Apache and PHP with the -builtin option.

My servers all have standard intalls of Cpanel. No custom scripts. How can I tell if the above will be an issue for the mysql upgrade.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,394
179
193
Finland
cPanel Access Level
Root Administrator
1) Not any special backup is needed, but you can of course make a copy of the /var/lib/mysql directory before you upgrade MySQL.

2) Must say it goes "over my head" what they say. But if you have standard cPanel server there should not be any issues like that.
 

audrey

Well-Known Member
Oct 18, 2006
114
5
168
Thanks for your help

The WHM already updated itself to v82.0.11

What version of MySql do you think that I should upgrade this server to?

My other conserns are
Cpanel's documentation says

1) We strongly recommend that you back up your database before you upgrade your database or change to MariaDB.
Is this backup a special backup or is this just the regular WHM backups including "Per Account and Entire MySQL Directory"


2)
If the buildapache application uses the MySQL libraries and headers on the server itself, and you change the MySQL version, Apache cannot function correctly. Because cPanel & WHM updates MySQL RPMs whenever Red Hat releases updates, this could automatically break thousands of servers within a few hours. For this reason, cPanel, L.L.C. always builds Apache and PHP with the -builtin option.

My servers all have standard intalls of Cpanel. No custom scripts. How can I tell if the above will be an issue for the mysql upgrade.

Thank you
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
What version of MySql do you think that I should upgrade this server to?
What version of MySQL are you running? If you're running a recent version of MySQL or Maria DB I would recommend MySQL 5.7 or MariaDB 10.3 but I would not move from MySQL 5.7 to MariaDB 10.2 or 10.3. Those versions of MariaDB do not contain the sys schema, which will cause check table calls to fail. If you do accidentally upgrade from MySQL 5.7 to MariaDB 10.2 or 10.3, you must manually remove that schema from your databases.

1) We strongly recommend that you back up your database before you upgrade your database or change to MariaDB.
Is this backup a special backup or is this just the regular WHM backups including "Per Account and Entire MySQL Directory"
This was answered earlier in the thread:

1) Not any special backup is needed, but you can of course make a copy of the /var/lib/mysql directory before you upgrade MySQL.
No special backup, the WHM Backups which are Per Account and Entire MySQL directory would be sufficient for this.


2) If the buildapache application uses the MySQL libraries and headers on the server itself, and you change the MySQL version, Apache cannot function correctly. Because cPanel & WHM updates MySQL RPMs whenever Red Hat releases updates, this could automatically break thousands of servers within a few hours. For this reason, cPanel, L.L.C. always builds Apache and PHP with the -builtin option.
The MySQL upgrade through cPanel will rebuild apache based on your choice of one of the following:

  • Rebuild Apache and PHP using saved settings — Choose this option to rebuild Apache and PHP with the last settings that you used. If you choose this option, the Apache and PHP rebuild process runs within the MySQL/MariaDB Upgrade interface.
  • Rebuild Apache and PHP with new settings — Choose this option to rebuild Apache and PHP with new settings. If you choose this option, the EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4) will appear so you that can complete the rebuild process.
You might want to read about the upgrade process here: MySQL or MariaDB Upgrade - Version 84 Documentation - cPanel Documentation