Unknown table 'column_statistics' in information_schema (1109) from mysql workbench

I am trying to export my database from MySQL Workbench but I get this during the export progress:

Running: mysqldump.exe --defaults-file="c:\users\user\appdata\local\temp\tmp2h91wa.cnf" --user=root --host=localhost --protocol=tcp --port=3306 --default-character-set=utf8 --skip-triggers "mydb" mysqldump: Couldn't execute 'SELECT COLUMN_NAME,

JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')

FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'mydb' AND TABLE_NAME = 'courses';': Unknown table 'column_statistics' in information_schema (1109)

Operation failed with exitcode 2 20:55:09 Export of C:\Users\user\Documents\dumps\mydb.sql has finished with 1 errors

Answer:

Tested on MySQL Workbench 8.0.18:
  • Navigate to C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules
  • Edit the file wb_admin_export.py (you need admin permissions for this)
  • amend the line:
skip_column_statistics = True if get_mysqldump_version() > Version(8, 0, 2) and self.owner.ctrl_be.target_version < Version(8, 0, 0) else False

to:

skip_column_statistics = True
DO NOT add inline comments or it won't work!

 skip_column_statistics = True # This won't work
Restart MySQL Workbench
Perform the export

Post a Comment

1 Comments

  1. Your good knowledge and kindness in playing with all the pieces were very useful.

    The App Ideas is a leading web and Mobile app development company. Along with website and app development. Here's the top food app ideas that will help to make your startup successful.

    ReplyDelete