> For the complete documentation index, see [llms.txt](https://docs.nodeum.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nodeum.io/faq/mariadb-migration-from-10.4-to-10.6.md).

# MariaDB migration from 10.4 to 10.6

MariaDB 10.4 repositories are no longer available.

Upgrade to MariaDB 10.6, which is the default version for NODEUM Data Archiving and Data Mover.

This procedure explains how to migrate a NODEUM database from a server running MariaDB 10.4 to a separate server running MariaDB 10.6.

In this example, the source database runs on Server1 with MariaDB 10.4.

The destination database runs on Server2 with MariaDB 10.6.

Both Server1 and Server2 must already have NODEUM installed.

Server2 should run a newer NODEUM version than Server1.

* On Server1 , execute the following commands:

Make a backup of the current database, where user and password are communicated on demand by our team.

```bash
mariadb-backup --backup --user=<user> --password=<password> --target-dir=/root/backup
mariadb-backup --prepare --user=<user> --password=<password> --target-dir=/root/backup
tar -cf backup.tar backup
```

Then transfer the created file to Server2 and copied it to destination folder `/root/backup`:

* On Server2, execute the following commands:

{% hint style="info" %}
As mentioned, NODEUM has already been installed on this server.
{% endhint %}

Stop MariaDB and Move the current database to another folder name.

```bash
systemctl stop mariadb
mv /var/lib/mysql rm /var/lib/mysql.old
```

Then make a restore of the database retrieved from Server1:

```bash
mariadb-backup --copy-back --target-dir=/root/backup
chown -R mysql:mysql /var/lib/mysql
systemctl start mariadb
```

At this stage you may be facing this error message if you verify the status on the MariaDB service:

```bash
systemctl status mariadb
● mariadb.service - MariaDB 10.6.27 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: active (running) since Tue 2026-06-09 08:34:32 UTC; 22s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 9766 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && echo _WSREP_START_POSITI>
    Process: 9797 ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position /run/mariadb/wsrep-new-cluster (code=exited, status=0/SUCCESS)
   Main PID: 9785 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 11 (limit: 251779)
     Memory: 98.2M
        CPU: 198ms
     CGroup: /system.slice/mariadb.service
             └─9785 /usr/sbin/mariadbd

Jun 09 08:34:32 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:32 0 [Note] InnoDB: Cannot open '/var/lib/mysql/ib_buffer_pool' for reading: No such file >
Jun 09 08:34:32 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:32 0 [Note] Server socket created on IP: '0.0.0.0'.
Jun 09 08:34:32 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:32 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at posit>
Jun 09 08:34:32 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:32 0 [ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables.>
Jun 09 08:34:32 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:32 0 [Note] /usr/sbin/mariadbd: ready for connections.
Jun 09 08:34:32 nod-da-101.nodeum.local mariadbd[9785]: Version: '10.6.27-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
Jun 09 08:34:32 nod-da-101.nodeum.local systemd[1]: Started MariaDB 10.6.27 database server.
Jun 09 08:34:40 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:40 3 [Warning] Host name 'nod-da-101.nodeum.local.nodeum.local' could not be resolved: Nam>
Jun 09 08:34:40 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:40 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '10>
Jun 09 08:34:45 nod-da-101.nodeum.local mariadbd[9785]: 2026-06-09  8:34:45 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: '10>

```

To solve this you have to perform a MariaDB upgrade and then restart MariaDB service:

```bash
mariadb-upgrade
```

```bash

systemctl status mariadb
● mariadb.service - MariaDB 10.6.27 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: active (running) since Tue 2026-06-09 12:52:23 UTC; 3s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 180089 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && echo _WSREP_START_POSI>
    Process: 180121 ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position /run/mariadb/wsrep-new-cluster (code=exited, status=0/SUCCESS)
   Main PID: 180109 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 22 (limit: 251779)
     Memory: 71.2M
        CPU: 192ms
     CGroup: /system.slice/mariadb.service
             └─180109 /usr/sbin/mariadbd

Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] InnoDB: 10.6.27 started; log sequence number 1080782; transaction id 21740
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] Plugin 'FEEDBACK' is disabled.
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] Server socket created on IP: '0.0.0.0'.
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] /usr/sbin/mariadbd: ready for connections.
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: Version: '10.6.27-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
Jun 09 12:52:23 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:23 0 [Note] InnoDB: Buffer pool(s) load completed at 260609 12:52:23
Jun 09 12:52:23 nod-da-101.nodeum.local systemd[1]: Started MariaDB 10.6.27 database server.
Jun 09 12:52:24 nod-da-101.nodeum.local mariadbd[180109]: 2026-06-09 12:52:24 3 [Warning] Host name 'nod-da-101.nodeum.local.nodeum.local' could not be resolved: N>
lines 1-27/27 (END)

```

Once this is done NODEUM ansible package has to be roll out to set back the database permissions.

```bash
ansible-playbook install.yml
```

When this is on the same server, the procedure looks the same, but it is recommended to pay more attention to make full dump and database backup which are copied externally.

The process is the following:

1. Full Backup of the server in following the regular NODEUM Backup feature.
2. Full dump of the Databases
3. Stop MariaDB server
4. Uninstall MariaDB-server 10.4.x
5. Install MariaDB-server 10.6.x
6. Restart MariaDB server
7. Execute `mariadb-upgrade` command
8. If everything is OK, do the appropriated check and verification
9. Run latest NODEUM ansible playbook following the standard procedure.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nodeum.io/faq/mariadb-migration-from-10.4-to-10.6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
