Rob Sharp wrote:
> Sluggers,
> 
> I've got a large (2.6G) MySQL dump containing extended SQL inserts which
> I need to import onto a server.
> 
> Normally, I'd import using something like:
> 
>       sudo nice mysql itm_integ < sqldump.sql
> 
> but in this case it grinds the server into the ground, presumably
> because it loads the file into memory/swap as it imports.
> 
> I'm thinking I somehow need to split this file into manageable chunks to
> import it, but the script I coded in PHP can't handle files of that size.

Thanks to all that replied, the file is well and truly split!

I used Peter's awk solution. Very elegant! That one will be filed under
'useful'.

For the sake of the  archives, I didn't find a solution to the segfault
in csplit, despite forcefully reinstalling the latest coreutils RPM.
That box will be retiring soon so I'm not too worried about it.

Thanks again,
Rob.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to