Erstellen Sie zuerst eine Sicherung des Systems.
Stoppen Sie dann die relevanten Dienste
systemctl stop mariadb.service redis-server.service php8.3-fpm.service nginx.service
Entfernen Sie im Anschluss die alten MariaDB-Repositories:
[ -f /etc/apt/sources.list.d/mariadb.list ] && rm - f /etc/apt/sources.list.d/mariadb.list
Je nach Serverbetriebssystem binden Sie nun die neuen MariaDB-Repositories ein:
Nur Ubuntu Server (X86_64):
apt install -y curl gnupg2 ca-certificates lsb-release ubuntu-keyring
curl -o /usr/share/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'
echo "deb [signed-by=/usr/share/keyrings/mariadb-keyring.pgp] https://mirror1.hs-esslingen.de/pub/Mirrors/mariadb/repo/11.4/ubuntu $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/mariadb.list
Nur Debian Server (X86_64):
apt install -y curl gnupg2 ca-certificates lsb-release debian-archive-keyring wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup chmod +x mariadb_repo_setup ./mariadb_repo_setup --mariadb-server-version="mariadb-11.4"
Ab hier geht es für beide Betriebssysteme weiter:
Entfernen Sie die alte Software (MariaDB 10.11) ohne dabei die Datenbanken selbst zu entfernen.
cd ~
apt-mark unhold mariadb* mariadb-* mysql* mysql-*
apt remove -y mariadb* mariadb-* mysql* mysql-*
Aktualisieren Sie nun ihr System und installieren MariaDB 11.4:
apt update && apt upgrade
apt install -y mariadb-client mariadb-server
Passen Sie die Datenbankkonfiguration „my.cnf“ an:
mkdir -p /var/log/mysql
chown -R mysql:mysql /var/log/mysql
mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
nano /etc/mysql/my.cnf
Kopieren Sie alle nachfolgenden Zeilen in die leere Datei:
[client]
default-character-set = utf8mb4
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
log_error=/var/log/mysql/mysql_error.log
nice = 0
socket = /var/run/mysqld/mysqld.sock
[mysqld]
# performance_schema=ON
basedir = /usr
bind-address = 127.0.0.1
binlog_format = ROW
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
datadir = /var/lib/mysql
default_storage_engine = InnoDB
expire_logs_days = 2
general_log_file = /var/log/mysql/mysql.log
innodb_buffer_pool_size = 1G
innodb_log_buffer_size = 32M
innodb_log_file_size = 512M
innodb_read_only_compressed=OFF
join_buffer_size = 2M
key_buffer_size = 512M
lc_messages_dir = /usr/share/mysql
lc_messages = en_US
log_bin = /var/log/mysql/mariadb-bin
log_bin_index = /var/log/mysql/mariadb-bin.index
log_bin_trust_function_creators = true
log_error = /var/log/mysql/mysql_error.log
log_slow_verbosity = query_plan
log_warnings = 2
long_query_time = 1
max_connections = 100
max_heap_table_size = 64M
max_allowed_packet = 512M
max-binlog-size = 512M
max_binlog_total_size = 2G
myisam_sort_buffer_size = 512M
port = 3306
pid-file = /var/run/mysqld/mysqld.pid
query_cache_limit = 0
query_cache_size = 0
read_buffer_size = 2M
read_rnd_buffer_size = 2M
skip-name-resolve
socket = /var/run/mysqld/mysqld.sock
sort_buffer_size = 2M
table_open_cache = 400
table_definition_cache = 800
tmp_table_size = 32M
tmpdir = /tmp
transaction_isolation = READ-COMMITTED
user = mysql
wait_timeout = 600
[mariadb-dump]
max_allowed_packet = 512M
quick
quote-names
[isamchk]
key_buffer = 16M
Starten Sie die Datenbank neu:
systemctl restart mariadb.service
Führen Sie nun das Datenbankupgrade aus
mariadb-upgrade --force


Wurde Ihnen alles mit OK quittiert, so war der Wechsel auf die Version 11.4 bereits erfolgreich.
Starten Sie alle Dienste neu:
systemctl restart mariadb.service redis-server.service php8.3-fpm.service nginx.service
In Ihrer Nextcloud wird nun MariaDB 11.4 verwendet.

Viel Spaß mit MariaDB 11.4.