How to restore your MySQL database?

 

This article applies to Rackbank Dedicated Servers running Plesk-

 
To get started with restoring your MySQL database, you need to execute it from the command line and proceed as follows:

1. At First, you have to create a new database on server to which you're migrating your data. It can be done in Plesk. You need to login into Plesk and click 'Domains'. Then, you have to click on 'Databases' and create a database having same name as that of database being restored.



2. After creation of database, you have to go back to the command line and run the command given below:

[[email protected]]#mysql -u admin -p`cat /etc/psa/.psa.shadow`
[databasename] < [path of backup]

3. If the database is stored in the name ‘psa’, it results from the above command saving the file in /root/psa.sql.


[[email protected]]#mysql -u admin -p`cat /etc/psa/.psa.shadow` psa < /root/psa.sql

And by following above steps, you can easily restore your database.

 

  • 78 Users Found This Useful
Was this answer helpful?

Related Articles

Why is cPanel/WHM not loading?

There are two main reasons why cPanel/WHM isn't loading that we've seen. Brand New Server If...

Large file transfer gives error: Corrupted MAC on input

Source: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/60764 Symptom When you...

How to do MySQL Troubleshooting?

MySQL is a database server used for large data storage and retrieval, yet the default...

Recieving an "ip_conntrack: table full" error.

On OpenVZ/HyperVM machines sometimes the ip_conntrack table will become full and drop packets....

How to install PHP on Ubuntu 14.04?

To get you started with installing PHP and Apache on VPS or Dedicated server running Ubuntu 14.04...