Mysql dump error unknown variable delayed insert false


Introduction


This error was encountered while trying to export a database using MySQL dump. The MySQL dump utility is used to create backups of MySQL databases. The error message “MySQL dump: Error: unknown variable ‘delayedinsert=false’” indicates that the attempt to export the database failed due to an invalid setting for the “delayed nsert” option.

It is possible to export a MySQL database without using the “delayed insert” option by specifying the “skip-opt” option as follows:

MySQL dump –skip-opt > .dump

What is MySQL dump?


Mysql dump is a command-line utility used to create backups of MySQL or MariaDB databases. It can be used to backup an entire database or selected tables. Mysql dump can also generate files in CSV, other delimited text, or XML format.

Heading: Support for mysqldump

Expansion:

Mysqldump is included in most MySQL and MariaDB distributions.

Heading: Usage

Expansion:

Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] –databases [OPTIONS] DB1 [DB2 DB3…]
OR mysqldump [OPTIONS] –all-databases [OPTIONS]

What is the error?


The error message:
“mysqldump: unknown variable ‘delayed_insert=false’”

This error is displayed when you try to run mysqldump with the –delayed-insert option, but the option is not recognised by your mysqldump version. The –delayed-insert option was added in MySQL 5.6.4, so if you are using an older version of MySQL then you will not be able to use this option.

You can either upgrade to a newer version of MySQL, or use another method of backing up your data (such as Percona Xtrabackup).

How to fix the error?


If you try to run mysqldump and get the following error:

mysqldump: Got error: 1054: Unknown column ‘delayedinsertfalse’ in ‘field list’ when using LOCK TABLES

To fix it, simply add –skip-opt to your mysqldump command. For example:

Conclusion

Thank you for taking the time to read this guide. I hope you have found it helpful. If you have any questions or comments, please feel free to post them in the comments section below.


Leave a Reply

Your email address will not be published. Required fields are marked *