faqts : Computers : Databases : MySQL : Shell Commands : mysqldump

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

122 of 156 people (78%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do you restore from a mysqldump in MySQL?

Jan 27th, 2000 12:53
j urban, John Hanson, Nathan Wallace,


It really depends on how you dumped the table and the current state of 
the database.  If you dumped the file using mysqldump --opt or similar 
options, you should be able to use the command:

  > mysql -uuser_name -p database_name < dumped_file

This will create the table and populate it with the rows that were 
dumped using myslqdump.

If you dumped the data in the table to a delimited file, you'll want to 
use mysqlimport or LOAD DATA INFILE.

See the MySQL Manual:
  http://www.mysql.com/Manual/manual.html#mysqlimport
  http://www.mysql.com/Manual/manual.html#LOAD_DATA
  http://www.mysql.com/Manual/manual.html#Programs