Version mismatch (10.6.11-MariaDB -> 10.4.27-MariaDB)

zwankie

Verified User
Joined
Apr 19, 2020
Messages
92
Hi,

I need some help with this please.

It's a relatively fresh install of DA 1.645 on AlmaLinux8
The settings in Custonbuild are:
MariaDB 10.4
Mysql 8.0

In one of the website apps I keep getting an error "Cannot load from mysql.proc. The table is probably corrupted."

Searching and reading up on this the suggestion is to run mysql_upgrade to fix the problem.
However, when I try it I get the following error:

FATAL ERROR: Version mismatch (10.6.11-MariaDB -> 10.4.27-MariaDB): Trying to downgrade from a higher to lower version is not supported!

I'm a little confused because from what I can see in Custombuild and mysql -V the installed version is 10.4.27-MariaDB

Advice would be appreciated.
 
Last edited:
Hello,

Your upgrade process must have probably filed to update MariaDB-server package. Check it with:

Code:
rpm -qa | grep -i mariadb

It's expected if you have DBs corrupted. You might need to fix/repair them or reinstall MariaDB and re-import DBs from a backup.
 
Thanks for the reply Alex,

Code:
rpm -qa | grep -i mariadb

MariaDB-common-10.4.27-1.el8.x86_64
MariaDB-devel-10.4.27-1.el8.x86_64
MariaDB-shared-10.4.27-1.el8.x86_64
MariaDB-server-10.4.27-1.el8.x86_64
MariaDB-backup-10.4.27-1.el8.x86_64
MariaDB-client-10.4.27-1.el8.x86_64

Seems like I will need to try one of the options you suggested.
 
OK, if this is the case, then probably MariaDB versions changed with custombuild, but the process of 10.6.11-MariaDB is still running. You might try and restart it and/or reboot the server. But before you do it, you'd better create dumps for the case if MariaDB fails to start. All the risks are purely on your own and I do not guarantee any success. I give guarantees only when I do things by myself.
 
No problem with risks, I understand.

There is something not good with this install.

When I do:

Code:
cd /usr/local/directadmin/custombuild/
./build update
./build mysql_backup

I get:
Dumping database mysql
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'mysql'': Cannot load from mysql.proc. The table is probably corrupted (1728)
BACKUP OF mysql FAILED!

Dumping database sys
mysqldump: Got error: 1356: "View 'sys.host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
mysqldump: Couldn't execute 'SHOW FIELDS FROM `host_summary`': View 'sys.host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
etc
etc
 
I see. What I'd try in such a case is to

1. remove MariaDB-*-10.4.27-1.el8.x86_64 packages and re-install MariaDB-*-10.6.x-1.el8.x86_64 packages.
2. create dumps
3. rename /var/lib/mysql/ to /var/lib/mysql.old/
4. re-install MariaDB-10.4.x
5. re-import dumps.

This would be a correct way to downgrade if you really want 10.4
 
So DA (at this time) automatically installs MariaDB 10.6 on a fresh install and if downgrading causes all kinds of issues then how is it possible to do a fresh install of DA but with a lower version of MariaDB without causing issues?
 
So DA (at this time) automatically installs MariaDB 10.6 on a fresh install and if downgrading causes all kinds of issues then how is it possible to do a fresh install of DA but with a lower version of MariaDB without causing issues?

The sys schema is not bundled with 10.3, 10.4,
it fixed by mariadb 10.6 psl see the link
If you don't use or need it, you can safely remove it.
DROP DATABASE sys;
after remove the sys schema mysqldump will work again
cd /usr/local/directadmin/custombuild/
./build update
./build mysql_backup

try again downgrading mariadb
good luck
 
Back
Top