I have a 250 MB backup SQL file but the limit on the new hosting is only 100 MB...
Is there a program that let's you split an SQL file into multiple SQL files?
I have a 250 MB backup SQL file but the limit on the new hosting is only 100 MB...
Is there a program that let's you split an SQL file into multiple SQL files?
You can split a large file in Eclipse. I have tried a 105GB file in Windows successfully:
Just add the MySQLDumpSplitter library to your project: http://dl.bintray.com/verace/MySQLDumpSplitter/jar/
Quick note on how to import:
MySQLDumpSplitter.jar
file and then FinishIt's not pretty (because it just splits on size, not on what is logically in the file) but you can use the unix split tool to accomplish this:
mysqldump mydb | split -b 100m mydbbackup
Make sure to check the man page for split, your copy may or may not accept the 100m size argument. Some need to have the size specified in bytes.
When you go to restore from the file you'll have to use cat to join them all back together.
cat mydbbackup.1 mydbbackup.2 mydbbackup.3 | mysql
split -l 5000 ./path/to/mysqldump.sql ./mysqldump/dbpart-
See [webmaster-source.com/2011/09/26/… –
Tied You can use mysql_export_explode https://github.com/barinascode/mysql-export-explode
<?php
#Including the class
include 'mysql_export_explode.php';
$export = new mysql_export_explode;
$export->db = 'dataBaseName'; # -- Set your database name
$export->connect('host','user','password'); # -- Connecting to database
$export->rows = array('Id','firstName','Telephone','Address'); # -- Set which fields you want to export
$export->exportTable('myTableName',15); # -- Table name and in few fractions you want to split the table
?>
At the end of the SQL files are created in the directory where the script is executed in the following format
---------------------------------------
myTableName_0.sql
myTableName_1.sql
myTableName_2.sql
...
© 2022 - 2024 — McMap. All rights reserved.