May 20, 2023

How To Upgrade MariaDB Database On Plesk

How To Upgrade MariaDB Database On Plesk

What is MariaDB Database?

MariaDB is an open-source relational database management system (RDBMS) that was forked from the MySQL database system. It is designed as a drop-in replacement for MySQL, meaning that it maintains compatibility with MySQL at the application level and can be used as a substitute without requiring extensive changes.

MariaDB offers features similar to MySQL, including data storage, retrieval, and management capabilities. It aims to provide enhanced performance, stability, and scalability while maintaining compatibility with existing MySQL applications and tools.

To upgrade the MariaDB database on Plesk, follow these steps:

  1. Log in to your Plesk control panel.
  2. Go to the “Databases” tab and select “Databases” from the drop-down menu.
  3. Locate the database you want to upgrade and click on its name.
  4. On the database management page, click on the “Webadmin” button. This will open the phpMyAdmin interface in a new tab.
  5. In phpMyAdmin, click on the “Database” tab in the top navigation menu.
  6. Select the option to export the database structure and data to a file for backup purposes. It’s crucial to have a backup before performing any upgrade.
  7. Once you have a backup, close phpMyAdmin and return to the Plesk control panel.
  8. In the “Databases” tab, click on the “Upgrade” button next to the database you want to upgrade.
  9. Plesk will present a list of available database upgrades. Select the desired MariaDB version and click “OK.”
  10. Plesk will start the upgrade process, which may take some time depending on the size of the database. Wait for the process to complete.
  11. After the upgrade is finished, you can verify the new MariaDB version by accessing the database management page in Plesk or using phpMyAdmin.

Remember to test your websites or applications after the upgrade to ensure they are functioning correctly with the updated MariaDB version.

If you prefer to use the Plesk Terminal to upgrade MariaDB, you can follow these steps:

  1. Log in to your Plesk control panel.
  2. Go to the “Tools & Settings” section.
  3. Under the “Plesk” section, click on “Updates and Upgrades” or “Updates” (depending on your Plesk version).
  4. In the Updates and Upgrades page, click on the “Add/Remove Components” button.
  5. Scroll down or use the search bar to find “MariaDB” in the list of available components.
  6. Click on the “+” icon next to “MariaDB” to expand the options.
  7. Select the desired version of MariaDB that you want to upgrade to.
  8. Click on the “Continue” or “OK” button to start the upgrade process.
  9. Plesk will begin the installation or upgrade of MariaDB using the selected version. This may take some time.
  10. Once the upgrade process is complete, you can verify the new MariaDB version by accessing the Plesk Terminal.

To access the Plesk Terminal:

  1. Go back to the Plesk control panel.
  2. Click on the “Webserver Configuration Troubleshooter” icon in the “Server Management” section.
  3. In the Troubleshooter page, scroll down to the “Additional Tools” section.
  4. Click on the “Plesk Terminal” button to open the terminal in a new window or tab.
  5. In the Plesk Terminal, you can execute commands to manage and configure your MariaDB database.

Remember to backup your database before performing any upgrades or modifications, as it is a good practice to ensure data safety.

If you prefer to use Linux command line to upgrade MariaDB on Plesk, you can follow these steps:

  1. Connect to your Plesk server via SSH using a terminal emulator (e.g., PuTTY, Terminal on macOS/Linux).
  2. Log in as the root user or switch to the root user using the su command.
  3. Check the current version of MariaDB installed on your server by running the command:
mysql -V

4. Make a backup of your MariaDB databases using the mysqldump command:

mysqldump -u <username> -p<password> --all-databases > backup.sql

Replace <username> and <password> with your MySQL username and password. This command will create a backup file named backup.sql in the current directory.

5. Once the backup is complete, update the package repository information by running the following command:

apt update or yum update

Depending on the Linux distribution you’re using (Debian/Ubuntu or CentOS/RHEL).

6. Upgrade MariaDB by running the appropriate command for your Linux distribution: For Debian/Ubuntu:

apt install mariadb-server

For CentOS/RHEL:

yum install mariadb-server

During the installation, the package manager will prompt you to confirm the upgrade. Press ‘Y’ or ‘Enter’ to proceed.

7. After the upgrade process completes, you can verify the new MariaDB version by running the command:

mysql -V

8. Restart the MariaDB service to apply the changes:

systemctl restart mariadb

9. Test your websites or applications to ensure they are functioning correctly with the upgraded MariaDB version.

Remember to take backups and proceed with caution when making changes to the database or server configuration.