Monday, November 17, 2014

HOW TO RESTORE YOUR DATABASE FROM BACKUP USING MYSQL COMMANDS



What is MySQL
MySQL is the world’s most popular open-source database for the cost effective delivery of reliable, high-performance and scalable e-commerce and database system used with PHP.
The restore process consists of unarchiving your archived database dump, and importing it into your MySQL database.

You May Also Read: HOW TO RESTORE YOUR DATABASE FROM BACKUP USING PHPMYADMIN

Assuming your backup is a .bz2 file, created using instructions similar to those given for Backing up your database using MySQL commands, the following steps will guide you through restoring your database:
1. Unzip your .bz2 file:
user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2
Note: If your database backup was a .tar.gz file called blog.bak.sql.tar.gz, then
tar -zxvf blog.bak.sql.tar.gz
is the command that should be used instead of the above.
2. Put the backed-up SQL back into MySQL:
user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
-p databasename < blog.bak.sql


Enter password: (enter your mysql password)
user@linux~/files/blog:>



Thank You.

1 comment:

  1. Step by step instructions to Recover Backup File to MySQL Database with DB Recovery Support
    Confronting reinforcement issue with respect to MySQL or not ready to recoup whole reinforcement record to MySQL database? Taking any sort of reinforcement is exceptionally basic undertaking and which isn't effortlessly recouped by the clients. It requires heaps of specialized aptitudes and capacities. Any way you can without much of a stretch recuperate your whole database with Cognegic's DB Recovery Support or Exchange Database Recovery. We at Cognegic additionally give Online Database Management Support to our top notch clients to determine their issues.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete