Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't export my database 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

like image 719
the essential Avatar asked Jun 11 '18 18:06

the essential


People also ask

Can we export data using Workbench?

The Data Export MySQL Workbench feature provides an inbuilt option to export the data into CSV format.

How do I import and export data from MySQL workbench?

Use this wizard to either export or import SQL generated from MySQL Workbench or with the mysqldump command. Access these wizards from either the Navigator area of the sidebar, or by selecting Server from the main menu, and then either Data Import or Data Export.


2 Answers

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.

like image 138
Artem Avatar answered Sep 22 '22 00:09

Artem


In MySql Workbench version 8.0.13 do the following steps:

  1. Go to Management/Data export
  2. Choose the schema to export in the 'Tables to export' list
  3. Click the 'Advanced Options...' button (top right)
  4. Search for the option 'Other/column-statistics'
  5. Set the value to 0
  6. Click the 'Return' button (top right)

Now it should work. Unfortunately, you'll have to do that every time you start MySql Workbench.

like image 29
Sander Bouwhuis Avatar answered Sep 20 '22 00:09

Sander Bouwhuis