Solved Mariadb is upgraded to 10.6.22 but keep saying it's 10.6.21.

AlexanderNL

Verified User
Joined
Feb 17, 2025
Messages
26
With someone trying to update MariaDB, but on some way it will not updating

#LinuxVersion
cat /etc/os-release
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

First in DirectAdmin:
Code:
Installing MariaDB
warning: MariaDB-client-10.6.22-1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID c74cd1d8: NOKEY
Verifying...                          ########################################
Preparing...                          ########################################
Updating / installing...
MariaDB-common-10.6.22-1.el8          ########################################
MariaDB-shared-10.6.22-1.el8          ########################################
MariaDB-client-10.6.22-1.el8          ########################################
MariaDB-server-10.6.22-1.el8          ########################################
MariaDB-devel-10.6.22-1.el8           ########################################
MariaDB-backup-10.6.22-1.el8          ########################################
Created symlink /etc/systemd/system/mysql.service -> /etc/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service -> /etc/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service -> /etc/systemd/system/mariadb.service.
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Giving mysqld a few seconds to start up...
This installation of MariaDB is already upgraded to 10.6.20-MariaDB.
There is no need to run mysql_upgrade again for 10.6.22-MariaDB, because they're both 10.6.
You can use --force if you still want to run mysql_upgrade
Restarting MySQL.
Installation completed.

The version was not been updated, it was also on 10.6.21.

In ssh:
Code:
[root@server custombuild]# cd /usr/local/directadmin/custombuild
[root@server custombuild]# mv mysql_backups mysql_backups.`date +%F`
[root@server custombuild]#  mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --force --skip-version-check
[root@server custombuild]# mysql -V
mysql  Ver 15.1 Distrib 10.6.21-MariaDB, for linux-systemd (x86_64) using readline 5.1
[root@server custombuild]#  mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --force
Error: Server version (10.6.22-MariaDB)
does not match the version of the server (10.6.21-MariaDB)
with which this program was built/distributed. You can
use --skip-version-check to skip this check.
FATAL ERROR: Upgrade failed
[root@server custombuild]#  mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --force --skip-version-check
[root@server custombuild]# mysql -V
mysql  Ver 15.1 Distrib 10.6.21-MariaDB, for linux-systemd (x86_64) using readline 5.1
[root@server custombuild]# reload mysql
-bash: reload: command not found
[root@server custombuild]# mysql_upgrade --skip-version-check --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --force
mysql_upgrade: unknown variable 'defaults-extra-file=/usr/local/directadmin/conf/my.cnf'
[root@server custombuild]#  mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --skip-version-check --force
[root@server custombuild]# mysql -V
mysql  Ver 15.1 Distrib 10.6.21-MariaDB, for linux-systemd (x86_64) using readline 5.1

[root@server custombuild]# mysql_upgrade --skip-version-check -u** -p** --force

da build clean
da build update
da build update_versions

Created symlink /etc/systemd/system/mysql.service -> /etc/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service -> /etc/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service -> /etc/systemd/system/mariadb.service.
Giving mysqld a few seconds to start up...<br>This installation of MariaDB is already upgraded to 10.6.21-MariaDB.<br>There is no need to run mysql_upgrade again for 10.6.22-MariaDB, because they're both 10.6.<br>You can use --force if you still want to run mysql_upgrade<br>Restarting MySQL.<br>Installation completed.<br>[root@server custombuild]#  mysql -V<br>mysql  Ver 15.1 Distrib 10.6.21-MariaDB, for linux-systemd (x86_64) using readline 5.1

Now I'm curious whether more people recognize this problem and how I can solve it...
 
[root@server ~]# rpm -qa | grep -i MariaDB
MariaDB-shared-10.6.22-1.el8.x86_64
MariaDB-server-10.6.22-1.el8.x86_64
MariaDB-common-10.6.22-1.el8.x86_64
MariaDB-devel-10.6.22-1.el8.x86_64
MariaDB-backup-10.6.22-1.el8.x86_64
MariaDB-client-10.6.22-1.el8.x86_64

[root@server ~]# mysql -V
mysql Ver 15.1 Distrib 10.6.21-MariaDB, for linux-systemd (x86_64) using readline 5.1
 
Then you most likely have two installations of MariaDB. Do you have mysql* or mariadb* folder in /usr/local/?

What do you see with
Code:
which mysql
?
 
[root@server ~]# cd /usr/local/
[root@server local]# dir
bin games libexec php56 red5_old share var
csf include man php74 red5-server src
directadmin lib mariadb-10.6.21-mC4j php81 safe-bin sysbk
etc lib64 mysql php84 sbin temp
What do you see with
which mysql?
which mysql
/usr/local/bin/mysql
 
Code:
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/MariaDB-client-10.6.22-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/MariaDB-client-10.6.22-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/MariaDB-devel-10.6.22-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/MariaDB-devel-10.6.22-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/MariaDB-server-10.6.22-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/MariaDB-server-10.6.22-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/MariaDB-shared-10.6.22-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/MariaDB-shared-10.6.22-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/MariaDB-common-10.6.22-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/MariaDB-common-10.6.22-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/MariaDB-backup-10.6.22-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/MariaDB-backup-10.6.22-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
download_cached: downloading 'https://mirror.mariadb.org/yum/10.6/centos/8/x86_64/rpms/galera-4-26.4.16-1.el8.x86_64.rpm' to '/usr/local/directadmin/custombuild/cache/galera-4-26.4.16-1.el8.x86_64.rpm'
###################################################################################################################################################################################################################################### 100.0%
Stopping mysqld ...
Installing galera...
warning: /usr/local/directadmin/custombuild/cache/galera-4-26.4.16-1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID c74cd1d8: NOKEY
Verifying...                          ########################################
Preparing...                          ########################################
Updating / installing...
galera-4-26.4.16-1.el8                ########################################
Removing old database RPM packages
Preparing packages...
MariaDB-client-10.6.22-1.el8.x86_64
Preparing packages...
MariaDB-devel-10.6.22-1.el8.x86_64
Preparing packages...
MariaDB-server-10.6.22-1.el8.x86_64
Preparing packages...
MariaDB-shared-10.6.22-1.el8.x86_64
Preparing packages...
MariaDB-common-10.6.22-1.el8.x86_64
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
Preparing packages...
MariaDB-backup-10.6.22-1.el8.x86_64
Installing MariaDB
warning: MariaDB-client-10.6.22-1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID c74cd1d8: NOKEY
Verifying...                          ########################################
Preparing...                          ########################################
Updating / installing...
MariaDB-common-10.6.22-1.el8          ########################################
MariaDB-shared-10.6.22-1.el8          ########################################
MariaDB-client-10.6.22-1.el8          ########################################
MariaDB-server-10.6.22-1.el8          ########################################
MariaDB-devel-10.6.22-1.el8           ########################################
MariaDB-backup-10.6.22-1.el8          ########################################
Created symlink /etc/systemd/system/mysql.service -> /etc/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service -> /etc/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service -> /etc/systemd/system/mariadb.service.
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Giving mysqld a few seconds to start up...
This installation of MariaDB is already upgraded to 10.6.21-MariaDB.
There is no need to run mysql_upgrade again for 10.6.22-MariaDB, because they're both 10.6.
You can use --force if you still want to run mysql_upgrade
Restarting MySQL.
Installation completed.
[root@server custombuild]#

mysql -V
-bash: /usr/local/bin/mysql: No such file or directory


When i look in DirectAdmin, its looks updated now?
 
Still something wrong. You did not delete the /usr/local/bin/mysql file right?
Also check your /usr/local/mysql/bin directory if it contains al the necessary files. A symlink should be there too:
lrwxrwxrwx 1 root root 7 2025-04-27 08:08 mysql -> mariadb
 
No i haven't deleted that file, only the dir /usr/local/mariadb-10.6.21-mC4j/usr/local/mariadb-10.6.21-mC4j

Code:
[root@server custombuild]# cd /usr/local/mysql/bin
-bash: cd: /usr/local/mysql/bin: No such file or directory

lrwxrwxrwx 1 root root 7 2025-04-27 08:08 mysql -> mariadb
huh?

Code:
lrwxrwxrwx  1 root root    7 2025-04-27 08:08 mysql -> mariadb
-bash: lrwxrwxrwx: command not found

This is the first warning:
Code:
warning: MariaDB-client-10.6.22-1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID c74cd1d8: NOKEY
 
Ok this was the solution i think? remove the files and update mysql?

At some moment you installed MariaDB from sources. It might had happened if you had:

Code:
mysql_force_compile=yes

in /usr/local/directadmin/custombuild/options.conf, and it does not have anything to do with Dovecot or /etc/os-release file
 
Back
Top