By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,519 Members | 2,412 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,519 IT Pros & Developers. It's quick & easy.

restoring data into mysql

P: n/a
i did "select * into outfile 'data.sql' from CDRS" to backup my data.
what is the reverse to get the data back in? it looks liek the fields
are delimited by tabs in the file.

tjanks

Feb 1 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Shiraz" <sh*****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
i did "select * into outfile 'data.sql' from CDRS" to backup my data.
what is the reverse to get the data back in? it looks liek the fields
are delimited by tabs in the file.


"LOAD DATA INFILE"
http://dev.mysql.com/doc/refman/5.0/en/load-data.html

Are you aware that mysqldump can back up individual tables? I know you said
in a past thread that your database is large (~250GB) but you can use
mysqldump in a manner similarly to your "into outfile" usage -- to back up
one table at a time.

You can also use a shell pipe to compress the output of mysqldump before it
writes it to disk. For example:
mysqldump ...options... | gzip > mybackup.sql.gz

Then uncompress it during restore:
gzcat mybackup.sql.gz | mysql ...options...

Regards,
Bill K.
Feb 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.