---
title: How to upgrade mariadb on CWP to version  10.11 lts
description: "Upgrading your database is essential for your application to run well. In this guide we provide 2 Methods you can use to upgrade. ## **Method 1: Automatic - Using the convenience script** This method will perform all the actions ensuring…"
url: "https://truehost.com/support/knowledge-base/how-to-upgrade-mariadb-on-cwp-from-10-4-to-10-6-on-almalinux-8/"
updated: "2025-04-23"
category: CWP Panel
---

# How to upgrade mariadb on CWP to version  10.11 lts

Upgrading your database is essential for your application to run well. In this guide we provide 2 Methods you can use to upgrade.

## **Method 1: Automatic - Using the convenience script**

This method will perform all the actions ensuring all checks and upgrades are done well.

Copy the Installation script below and run it.

```
bash <(curl -s https://gitlab.com/dannydev77/cwpdb-upgrade/-/raw/main/cwpdb-upgrade.sh || wget -qO- https://gitlab.com/dannydev77/cwpdb-upgrade/-/raw/main/cwpdb-upgrade.sh)
```

![](https://truehost.com/support/wp-content/uploads/2024/11/image-74-1024x479.png)

Running the Script.

![](https://truehost.com/support/wp-content/uploads/2024/11/image-75-1024x494.png)

Upgrade script complete.

![](https://truehost.com/support/wp-content/uploads/2024/11/image-76-1024x302.png)

Confirm status after Upgrade.

![](https://truehost.com/support/wp-content/uploads/2024/11/image-77-1024x478.png)

## **Method 2: Manual - Follow the steps below.**

In this part, upgrade is being done from version 10.4 to 10.6

Adjust to meet your desired version.

### Step 1: Perform backups

Use the command below to perform a backup of all databases

**`mysql -N -e 'show databases' | while read dbname; do mysqldump --complete-insert --routines --triggers --single-transaction "$dbname" > /home/backups/databases/"$dbname".sql; done`**

### Step 2: Get the current db root password. Store it as it will be needed at later stages.

**`grep -i pass /root/.my.cnf`**

### Step 3 : Verify the installed version and upgrade.

**`rpm -qa|grep -i maria|grep "-10.4."`**

##### First you need to change the MariaDB repo and replace it with MariaDB 10.6 repo:

**`sed -i 's/10.4/10.6/g' /etc/yum.repos.d/mariadb.repo`**

##### Second remove MariaDB 10.4 :

**`systemctl stop mariadb mysql mysqldsystemctl disable mariadbrpm --nodeps -ev MariaDB-server`**

##### Third Install MariaDB 10.6 :

**`yum clean allyum -y update "MariaDB-*"yum -y install MariaDB-serversystemctl enable mariadbsystemctl start mariadb`**

##### Fourth you need to upgrade your database tables to the latest version:

After upgrade, you can use "mysql" command to verify the MariaDB version running on your server

mysql_upgrade --force

mysql --version

Lastly confirm with

**`systemctl status mariadb`**

====================================================
