Can't export my database from mysql workbench

前端 未结 13 748
既然无缘
既然无缘 2020-12-07 20:24

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

相关标签:
13条回答
  • 2020-12-07 20:54

    in version 8, I modified "wb_admin_export.py" and restart workbench. works for me

    def start(self):
    .
    .
    .
        title = "Dumping " + schema
        title += " (%s)" % table
        # description, object_count, pipe_factory, extra_args, objects
        args = []
        args.append('--column-statistics=0')
    
    class ViewsRoutinesEventsDumpData(DumpThread.TaskData):
        def __init__(self, schema, views, args, make_pipe):
            title = "Dumping " + schema + " views and/or routines and/or events"
            if not views:
               extra_args = ["--no-create-info"]
            else:
                extra_args = []
            DumpThread.TaskData.__init__(self,title, len(views), ["--skip-triggers", " --no-data" ," --no-create-db", "--column-statistics=0"] + extra_args + args, [schema] + views, None, make_pipe)```
    
    0 讨论(0)
  • 2020-12-07 21:02

    To summarize what I did from the helpful comments of @JustinLaureno and @Mohd.Shaizad, 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

    0 讨论(0)
  • 2020-12-07 21:02

    You can use native MySQL Workbench "Migration wizard" to migrate data without errors. It can be found in menu Database -> Migration Wizard It can transfer data "online" but I didn't found an option to create a dump file with it. It is a pretty good solution for migrations

    0 讨论(0)
  • 2020-12-07 21:03

    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.

    0 讨论(0)
  • 2020-12-07 21:03

    I found this condition in wb_admin_export.py instead of a commented --column-statistics=0. you can remove the else False condition, or change it to else True.

    skip_column_statistics = True if get_mysqldump_version() > Version(8,
    0, 2) and self.owner.ctrl_be.target_version < Version(8, 0, 0) else
    True
    
    0 讨论(0)
  • 2020-12-07 21:15

    Go to C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules and open this file wb_admin_export.py and uncomment "--column-statistics=0" then Restart the workbench

    0 讨论(0)
提交回复
热议问题