Importing large mysql database files

I’m using sed to replace header/mysql create database name and use database.

sed -i ‘1,30 s/`parser`/`server_parser`/’ new_parser.sql

The above command edits the file in place ( -i ) option.

Replaces in the first 1-30 lines  any `parser` with `server_parser`.

If this doesn’t work for importing this huge 10 gig sql file im going to use tail to strip the header from this database file.

Using head -n 30 to see what line i should start stripping the file from.

Then tail -n +12 new_parser.sql > fixed_parser.sql

We shall see if it works… 20 minutes to go.

Leave a Reply

Your email address will not be published. Required fields are marked *