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
Do you have any idea what might going wrong? Thanks
In MySql Workbench version 8.0.13 do the following steps:
Now it should work. Unfortunately, you'll have to do that every time you start MySql Workbench.
I found this condition in
wb_admin_export.py
instead of a commented--column-statistics=0
. you can remove theelse False
condition, or change it toelse True
.To summarize what I did from the helpful comments of @JustinLaureno and @Mohd.Shaizad, tested on MySQL Workbench 8.0.18:
C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules
wb_admin_export.py
(you need admin permissions for this)amend the line:
to:
I had the same issue 5 minutes ago.
I fixed it by adding in my
mysqldump
command--column-statistics=0
. Do it and it should work.In my case it's a phing task but you should get the idea.
Also ran into this problem. Decided as follows: In the Workbench menu, go to:
Edit - Preferences - Administration
In the field "Path to mysqldump Tool", prescribe the path to mysqldump.exe, in my case "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqldump.exe", click OK.
After that, the error no longer appeared.
Go to
C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules
and open this filewb_admin_export.py
and uncomment "--column-statistics=0
" then Restart the workbench