I have a very large MySQL table on my local dev server: over 8 million rows of data. I loaded the table successfully using LOAD DATA INFILE.
I now wish to export thi
I just did an import/export of a (partitioned) table with 50 millions record, it needed just 2 minutes to export it from a reasonably fast machine and 15 minutes to import it on my slower desktop. There was no need to split the file.
mysqldump is your friend, and knowing that you have a lot of data it's better to compress it
@host1:~ $ mysqldump -u -p | gzip > output.sql.gz
@host1:~ $ scp output.sql.gz host2:~/
@host1:~ $ rm output.sql.gz
@host1:~ $ ssh host2
@host2:~ $ gunzip < output.sql.gz | mysql -u -p
@host2:~ $ rm output.sql.gz
- 热议问题