Couldn’t execute ‘SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM Error in MySQLDump

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
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.