0

I need to dump database which hosts on Microsoft Azure.
I tried following:
1. Connect to db with MySQL Workbench.
2. Select Data Export and use it. The warning message says that 'unequal version of mysqldump(8.0.12) and MySQL Server to be dumped(5.7.21) may cause issues' were shown.
3. No upgrades avaliable at MySQL Community Installer.
So where's the question:
1. How to get mysqldump of required version?
2. mysqldump version seems higher than needed but it still doent work. Why?

All attemps had following log:

18:59:01 Dumping schedule-system (all tables)
Running: "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump.exe" --defaults-file="c:\users\myrce\appdata\local\temp\tmp2jqnwp.cnf"  --user=jesper@omsu-projects --host=omsu-projects.mysql.database.azure.com --protocol=tcp --port=3306 --default-character-set=utf8 --skip-triggers "schedule-system"
mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'schedule-system' AND TABLE_NAME = 'classroom';': Unknown table 'column_statistics' in information_schema (1109)

Operation failed with exitcode 2
18:59:06 Dumping recruiting-server (all tables)
Running: "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump.exe" --defaults-file="c:\users\myrce\appdata\local\temp\tmpobvhuq.cnf"  --user=jesper@omsu-projects --host=omsu-projects.mysql.database.azure.com --protocol=tcp --port=3306 --default-character-set=utf8 --skip-triggers "recruiting-server"
mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'recruiting-server' AND TABLE_NAME = 'companies';': Unknown table 'column_statistics' in information_schema (1109)

Operation failed with exitcode 2
18:59:10 Export of C:\Users\myrce\Desktop\data.sql has finished with 2 errors
  • This post appears to be [off-topic](http://stackoverflow.com/help/on-topic) as per *Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming.* Your question may be better suited for [Super User](http://superuser.com/) – Pm Duda Sep 06 '18 at 13:55
  • I have reached out to the product group to inquire about this. Thank you for raising this issue. – Mike Ubezzi Sep 06 '18 at 15:25
  • @PmDuda my post involves issue that I don't know how to solve. I am looking for solution here. So it's not off-topic. May be i was wrong when called post like Questions. –  Jesper Sep 06 '18 at 16:38
  • It looks like a new flag was enabled in mysqldump 8. See related question for more details: https://serverfault.com/questions/912162/mysqldump-throws-unknown-table-column-statistics-in-information-schema-1109 You can download an older version of mysqldump from the archived downloads available here: https://downloads.mysql.com/archives/community/ – andrea-lam-MSFT Sep 07 '18 at 00:35

1 Answers1

0

Hei Jesper, I suppose you use an Azure Database for MySQL server. I use it too, and I had the same problem. Steps I did to solve the problem:

  1. Uninstall workbench and install the last version, 8.0.12

  2. Download the exactly 5.7.21 from https://downloads.mysql.com/archives/community/

  3. In Workbench path: Edit/Preferences/Administration, I defined the mysqldump.exe from Mysql 5.7.21 downloaded and uncompressed.

Remember to define long Mysql session timeouts in the path: edit\preferences\SQLEditor