How do I restore a MySQL database?
Important
Notes:
This
guide will need to be executed from the command line. If you do not
know how to connect to your server using command line, you should first
read "How do I connect to my Linux server by Command Line?
Getting
Started:
- First,
you'll need to create a new database on the server you're moving the
data to. This can be done from Plesk
is a control panel made by the Parallels company. Aplus.net supplies Plesk as a platform independent Gui that make the administration of Domains, E-mail, Statistics simpler than administrating the Operating system itself.'); return false">Plesk. Log into Plesk, then click
'Domains'. Next click on 'Databases' and create a database with the
same name as the database you're restoring:

- Once the database is created, you are going to want and go back to the command line and run the following command:
|
| [root@hostname]#mysql -u admin -p`cat /etc/psa/.psa.shadow` [databasename] < [path of backup] | |
- The
following example shows the above command, as if we were restoring a
database named 'psa'. We saved the file in /root/psa.sql
|
| [root@hostname]#mysql -u admin -p`cat /etc/psa/.psa.shadow` psa < /root/psa.sql | |
- Once this is done, you should have successfully restored your database.
Related Articles
No related articles were found.
Attachments
No attachments were found.
Visitor Comments
No visitor comments posted.
Post a comment
Post Comment for "How do I restore a MySQL database?"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.