Couldn’t execute ‘SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, ‘$.”number-of-buckets-specified”‘
Error: While executing mysqldump for taking the MariaDB backup. I am getting the following error:
mysqldump.exe -uadmin --host=mariadbaws.ardifhtck.ap-west-1.rds.amazonaws.com --port=3306 DemoDB > C:\MariaDBBackup\DemoDB.txt
mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'DemoDB' AND TABLE_NAME = 'test1';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
Cause: In mysqldump utility 8, the column-statistics is enabled. You need to disable it.
Solution: Use the MySQLDump command by adding --column-statistics=0
. It will fix the issue.
mysqldump.exe --column-statistics=0 -uadmin --host=mariadbaws.ardifhtck.ap-west-1.rds.amazonaws.com --port=3306 DemoDB > C:\MariaDBBackup\DemoDB.txt