I try to make a copy of a remote mysql database with mysqldump and I get this error and I really don't know where to go.
I'm trying to connect and make a copy of the entire database.
C:\Windows\system32>mysqldump -h 212.XXX.XXX -P 3306 -u usuario1 -p intranet > dump.sql
Enter password: **********
mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM,'$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS
WHERE SCHEMA_NAME = 'intranet' AND TABLE_NAME = 'proveedores';':
Unknown table 'COLUMN_STATISTICS' in
information_schema (1109)
Thank you,
In MySQL version 8, the command has
mysqldump
the flag enabled by defaultcolumn-statistics
, which is incompatible with earlier versions of MySQL.Apparently the dump was made on a MySQL 8+ version and now you are trying to restore on an older version.
If possible, it is recommended to update your version of MySQL. If this is not possible, you can turn off that option when dumping by setting the flag:
--column-statistics=0
, for example:For more details see this answer on ServerFault.