Enable binary mode while restoring a Database from an SQL dump

后端 未结 17 1690
耶瑟儿~
耶瑟儿~ 2020-12-07 14:41

I am extremely new to MySQL and am running it on Windows. I am trying to restore a Database from a dumpfile in MySQL, but I get the following error:

$ >m         


        
17条回答
  •  被撕碎了的回忆
    2020-12-07 14:52

    Under linux Ungzip your file using gunzip Edit your unzip sql file using

    vi unzipsqlfile.sql

    Remove the first binary line with esc dd go to the bottom of the file with esc shift g remove the last binary line with dd save the file esc x: Then reimport to mysql with :

    mysql -u username -p new_database < unzipsqlfile.sql

    I performed that with a 20go sql file from a jetbackup cpanel mysql backup. Be patient to wait vi doing the job for big files

提交回复
热议问题