I am currently in the process of migrating my ownCloud from my old Pi 3B to a Pi 4B. On the 3, I made a backup of my MariaDB with mysqldump:

mysqldump --single-transaction --routines --triggers --all-databases | gzip > backup_db.sql.gz

Here is the version info from that file:

-- MySQL dump 10.16  Distrib 10.1.38-MariaDB, for debian-linux-gnueabihf (armv7l)
-- Host: localhost    Database: 
-- ------------------------------------------------------
-- Server version   10.1.38-MariaDB-0+deb9u1

Now on my Pi 4, I tried to restore this with

gunzip <backup_db.sql.gz | mysql

Unfortunately, this gave the following error:

ERROR 1805 (HY000) at line 869: Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted

I realize the mismatching MariaDB versions may be a problem, but I can't install an earlier version on the Pi 4:

apt list -a mariadb-server
Listing... Done
mariadb-server/stable,now 1:10.3.17-0+deb10u1 all [installed]

According to Install MariaDB 10.2 on Raspbian Stretch, installing 10.3 on the Pi 3 is probably also not an option.

I also found this in the MariaDB/mysqldump documentation:

mysqldump from an earlier MariaDB release cannot be used on MariaDB 10.3 and beyond

How do I resolve this?

1 Answer 1


I resolved my problem by creating a new database dump that only includes the owncloud database:

mysqldump --single-transaction --routines --triggers owncloud

Of course, any additional databases need to be migrated separately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.