Importing large sql file to MySql via command line

后端 未结 5 908
猫巷女王i
猫巷女王i 2020-12-22 18:08

I\'m trying to import an sql file of around 300MB to MySql via command line in Ubuntu. I used

source /var/www/myfile.sql;

Right now it\'s

5条回答
  •  我在风中等你
    2020-12-22 18:58

    The solution I use for large sql restore is a mysqldumpsplitter script. I split my sql.gz into individual tables. then load up something like mysql workbench and process it as a restore to the desired schema.

    Here is the script https://github.com/kedarvj/mysqldumpsplitter

    And this works for larger sql restores, my average on one site I work with is a 2.5gb sql.gz file, 20GB uncompressed, and ~100Gb once restored fully

提交回复
热议问题