Installing MariaDB Community Server 10.6 on Rocky Linux 9.3

Configure the YUM package repository.

~]$ sudo yum -y install wget
~]$ wget https://r.mariadb.com/downloads/mariadb_repo_setup
~]$ echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \
| sha256sum -c -
~]$ chmod +x mariadb_repo_setup
~]$ sudo ./mariadb_repo_setup \
--mariadb-server-version="mariadb-10.6"

Install MariaDB Community Server and package dependencies:

~]$ sudo yum -y install MariaDB-server MariaDB-backup

Set your system variables and options in the configuration file.

~]$ sudo bash -c 'cat > /etc/my.cnf.d/z-custom-my.cnf << EOF
[mariadb]
datadir = /data/mysql
socket = /data/mysql/mysql.sock
log_error = mariadb-test.err
innodb_buffer_pool_size = 1G

[client]
socket = /data/mysql/mysql.sock
EOF'

~]$ sudo mariadb-install-db --defaults-file=/etc/my.cnf --datadir=/data/mysql --user=mysql

Starting the Server.

~]$ sudo systemctl enable mariadb --now

Testing.

~]$ sudo mariadb --socket='/data/mysql/mysql.sock'
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.6.17-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>