How do I split the output from mysqldump into smaller files?

前端 未结 18 1507
孤城傲影
孤城傲影 2020-11-27 13:50

I need to move entire tables from one MySQL database to another. I don\'t have full access to the second one, only phpMyAdmin access. I can only upload (compressed) sql file

18条回答
  •  [愿得一人]
    2020-11-27 14:17

    First dump the schema (it surely fits in 2Mb, no?)

    mysqldump -d --all-databases 
    

    and restore it.

    Afterwards dump only the data in separate insert statements, so you can split the files and restore them without having to concatenate them on the remote server

    mysqldump --all-databases --extended-insert=FALSE --no-create-info=TRUE
    

提交回复
热议问题