How do I restore a database?

Re: How do I restore a database?

by Tariq Adel Al Ammadi -
Number of replies: 0
I am assuming you are using MySQL, and if so you should really take a good look at the documentation mentioned in the previous post. The following is a simple example of how to create and restore a database dump:

  1. Create a dump file at the command prompt: mysqldump -h <your_host> -u <your_username> -p <your_database> > <your_outputfile>
  2. Create a database to insert this data into, at the mysql prompt enter: CREATE DATABASE <new_db_name>;
  3. At the command prompt type: mysql -h <your_host> -u <your_username> -p <new_db_name> < <your_outputfile>