Upgrade MySQL database from 8.0 to 8.4

Our technical support can complete this for you close to a scheduled time within our operating hours. You can order a 1 hour Professional Service.

Technical Experience Required: Intermidiate
Estimated time: ~30 minutes

F.A.Q

  1. Do i have to upgrade to MySQL 8.4?
    It is not mandatory, but highly recommended for stability and performance improvement.

  2. Will the MediaCP automatically upgrade to MySQL 8.4?
    No. The upgrade process can take some time to complete depending on how many channels and reporting data exists, it is best managed manually.

  3. What is the benefit of upgrading?
    MySQL 8.4 provides performance and stability improvements.

  4. What version of MySQL am i using now?
    You can run the following command to check your MySQL version:
    /usr/local/mediacp/mysql/bin/mysql --version

Notice

  • You should ensure that you have at least 2 GB free on the / path before beginning (df -h)
  • This guide includes instructions to easily revert the changes should there be any problem
  • Installations with many busy stations are likely to have a large historics table and the upgrade process may take a longer time (1-2 hours) to complete.
  • These steps follow a MySQL In-Place Binary Upgrade

Step 1 - Backup

  1. Perform a MediaCP backup of installation + database:
    /root/init backup --no-contents;
  2. Stop & Backup the entire MySQL path. This will allow for a simple restoration of mysql with all your data should there be any problem at all.
    mediacp stop mysql;
    cp -a /usr/local/mediacp/mysql/ /usr/local/mediacp/mysql.backup/;

Step 2 - MySQL 8.0 upgrade to 8.4

  1. Ensure MySQL is stopped:
    mediacp stop mysql;
  2. Download and extract MySQL 8.4 from our mirror:
    wget http://mirror.mediacp.net/download/common/mysql-8.4.9-linux-glibc2.28-x86_64-minimal.tar.xz;
    tar xf mysql-8.4.9-linux-glibc2.28-x86_64-minimal.tar.xz;
  3. Install MySQL 8.4 binaries:
    cp -ar mysql-8.4.9-linux-glibc2.28-x86_64-minimal/* /usr/local/mediacp/mysql/;
  4. Start MySQL
    mediacp restart mysql
  5. Monitor the error log:
    tail -F /usr/local/mediacp/mysql/data/*.err
    1. MySQL will perform the upgrade process automatically at this point, which may take some time to complete. Even know MySQL service is started, it may not become available until the process is completed.

      DO NOT STOP MYSQL OR RESTART YOUR SERVER UNTIL COMPLETED. 
    2. Wait for messages resembling the following - pay careful attention for any errors:
      Server upgrade from '80031' to '80300' started
      Server upgrade from '80031' to '80300' completed
      [Server] /usr/local/mediacp/mysql/bin/mysqld: ready for connections.
  6. Check the MediaCP is online at your regular web address

Step 4 - Clean up

If there were no errors, then you can safely remove the mysql full backup directory:

rm -rf /usr/local/mediacp/mysql.backup/;

Reverting in case of failure

If you experience any problems, then you can run the following to restore the original MySQL service:

mediacp stop mysql;
rm -rf /usr/local/mediacp/mysql/;
mv /usr/local/mediacp/mysql.backup/ /usr/local/mediacp/mysql/
mediacp restart mysql;

 

  • Database, MySQL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

There is not enough space on this disk to backup the MediaCP and contents

While performing a backup (either automatic or manual) you may encounter the error message below:...

Differences between MB, GB and MiB, GiB

MediaCP uses a digital metric of units when referring to data size. In this case 1 (GB) Gigabyte...

OpenVZ virtualization

During the installation or upgrade of MediaCP you might receive the following notice: ERROR:...

Unable to access MediaCP on port 2020

There are typically only two reasons why the Media Control Panel is inaccessible: The mediacp...

Cannot login to the MediaCP with valid credentials

If you are unable to login to the MediaCP then there could be several reasons: Captcha...