1. 程式人生 > >解決MysqlWorkbench Export Data時報錯:‘delayed-insert‘=F

解決MysqlWorkbench Export Data時報錯:‘delayed-insert‘=F

set mic cursor 時報 mysqld -h 找到 col show

MysqlWorkbench Export Data時報錯


    問題

    MysqlWorkbench6.0之後的版本使用export data時會遇到這個錯誤12
    Running: /Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump --defaults-file
    ="/var/folders/xl/s140j_d96n5djybp3rvh2nt80000gp/T/tmpn6fxeU/extraparams.cnf"  --set-gtid-purged=OFF --delayed-insert=FALSE --host=121.40.157.75 --protocol=tcp --user=root --port=3306 --default-character-set=utf8 
    --skip-triggers "matchbox_test"mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE'Operation failed with exitcode 713:19:01 Export of /Users/jason/Documents/Dump20151116.sql has finished with 1 errors123456789

    原因

    我們看錯誤報告顯示這個變量 'delayed-insert=FALSE' 不被識別,workbench默認配置裏會開啟
    這個變量並且默認值是false。如果我們用不到這個變量可以更改配置文件,註釋掉這個變量來解決123

    解決步驟

    • 找到配置文件目錄:__InstallPath__/modules

    • 打開python格式的輸出配置文件:wb_admin_export_options.py

    • 找到所在行:"delayed-insert":["Write INSERT DELAYED statements rather than ...

    • 在行開頭插入#號註釋改行

    • 保存文件,重啟Workbench

    配置文件所在位置

    windows

    Workbench的安裝目錄
    如:C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules12

    Mac

    Applications -> MYSQLWorkbench.app/Contents/Resources/plugins.Note: 在應用上右擊選擇 Show Package contents 進入應用目錄12

    Ubuntu

    /usr/lib/mysql-workbench/modules/wb_admin_export_options.py1


    解決MysqlWorkbench Export Data時報錯:‘delayed-insert‘=F