Create mysqldump backup - innodb_large_prefix problem


I am creating database backups with cron, the command

/usr/bin/mysqldump --lock-tables -h -u root -**** owncloud > $daily0/owncloud-sqlbkp_date +"%Y%m%d".bak

By starting my script manually, I noticed this error message:

mysqldump: unknown variable ‘innodb_large_prefix=on’

Is something misconfigured? How can I fix this error, the backup is only an empty file.

Try to check this:

I tried manually with the commands from the doc, but the error message remains.

try this:
sudo -u www-data php occ maintenance:repair
if get error the try to fix it
if there is not try:

if not then try:

or maybe this:

good luck

1 Like

Thanks, maintenance:repair could not find any issues.

But I just noticed, the error comes by executing: :roll_eyes:

sudo mysql -u root -p
mysql: unknown variable ‘innodb_large_prefix=on’

What can I do now?

For older versions you need to edit the MySQL config file and restart and then manually convert each table.

There is a guide to do that.

Where is the guide?
It is mariadb-server-10.3 installed on debian buster.

1 Like

I needed to remove all options, including innodb_file_per_table=1 from the file /etc/mysql/my.cnf

The documentation mentioned, that this option should be set, but this is default in MariaDB as far as I know.

MariaDB [(none)]> show variables like 'innodb_file_per_table';
| Variable_name         | Value |
| innodb_file_per_table | ON    |
1 row in set (0.006 sec)

The Database is already utf8mb4

MariaDB [(none)]> show variables like "character_set_database";
| Variable_name          | Value   |
| character_set_database | utf8mb4 |
1 row in set (0.007 sec)

Updated my backup command:
/usr/bin/mysqldump --default-character-set=utf8mb4 --lock-tables --single-transaction -h -u root -p**** owncloud > $daily0/owncloud-sqlbkp_date +"%Y%m%d".bak

I hope anything fine now. :smile: