Categories
· Show all categories
· New Customer FAQs
· E-Mail
· FTP - File Transfers
· Domains
· SSH and Telnet
· Scripting Languages
· Password Protection
· MySQL
· Stats
· Power Tools
· FAQ Home
· EchoEcho+ Support
|
MySQL: How do I restore a backup of a database?
|
You can restore a backup of a database created with mysqldump *.
1: Create the database with the site owner panel
- The ONLY way you can create databases is from the site owner panel, so you must create the database first.
- If it already exists, delete it, and create it again to make sure it's empty before the restore.
2: Log in to the server via SSH .
3: Write a command like this (directly at the SSH prompt):
mysql -u username -h localhost -p databasename < textfile
- username is the username for your hosting plan, for example: testuser.
- databasename is the name of your database, for example: testuser_mybase.
- textfile is the name of the backup file, for example: backup_mybase.
4: You will be asked for your password. Enter the mysql password for the database.
That's it - mysql will now read the backup file and create and restore your database tables!
* The backup procedure is explained here: How do I create a backup of a database?
Last update: 12.07.2009, 21:19 Author: EchoEcho Support
|
You cannot comment on this entry | Content Overview: MySQL
|
|
|