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:

[root@hostname]#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.


[root@hostname]#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 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

Large file transfer gives error: Corrupted MAC on input

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

Recieving an "ip_conntrack: table full" error.

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

Webmin has an SSL error.

If you try to log into a new install and you receive this error: An error occurred during a...

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...

Linux version Confirmation on your dedicated server

Rackbank provide all information about your server's operating system when you ordered your...