Back Up and Restore WebSite |
| |
 |
Back Up and Restore MySQL DataBases
Restore MySQL DataBase |
|
Restore a MySQL Database
You don't need to restore a MySQL Database, unless:
- You move your old hosting account from other company to MyGreatName.
- You happen to delete the database in your hosting account.
- Your hosting account is damaged by accident.
- Others...
Restore a MySQL Backup will restore the following to your hosting account:
- Create all tables of the Restore Database
- Restore the records of the tables.
You must do a MySQL Database backup before you can Restore a MySQL Database Backup. The Restore procedures are very simple.
- Login your cPanel account.
- Select the Download/Upload backup file.
- Select the "Restore a MySQL Database Backup".
- Browse the backup file (in .gz format) in your computer.
- Click the Upload button
- Done!
This may take a few minutes, depend the size of your database. After the restore is finished, you can see the details of the restore as below:
Restore a MySQL Database Backup
Restoring files
--------------
DROP TABLE IF EXISTS mytable
--------------
--------------
CREATE TABLE mytable (
id int(11) NOT NULL auto_increment,
username varchar(10) default NULL,
nick_name varchar(60) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM
--------------
--------------
INSERT INTO mytable (id, username, nick_name) VALUES (1,'cookie','best girl')
--------------
--------------
INSERT INTO mytable (id, username, nick_name) VALUES (2,'peter','good man')
--------------
.......................................................
.......................................................
.......................................................
.......................................................
--------------
DROP TABLE IF EXISTS myfriend
--------------
--------------
CREATE TABLE myfriend (
username char(12) NOT NULL default '',
email char(40) default NULL,
PRIMARY KEY (username)
) TYPE=MyISAM
--------------
--------------
INSERT INTO myfriend (username, email) VALUES ('haha' ,'haha@xxxxxxxxx.com')
--------------
--------------
INSERT INTO myfriend (username, email) VALUES ('hehe' ,'haha@xxxxxxxxx.com')
--------------
.......................................................
.......................................................
.......................................................
.......................................................
.......................................................
.......................................................
|
If you have more than one database, restore them one by one.
If you have used scripts (e.g. PERL or PHP) in your website to connect to the database, you need to create user(s) and grant access to the user(s) as well. The Backup and Restore process CANNOT restore this setting.
To create user(s), please follow:
- Login your cPanel account.
- Click the link of MySQL Databases.
- Fill in the username and password under Create MySQL user.
- Click the "Create MySQL User" button.
- Repeat if you need to create other MySQL users
- Done!
To grant access to the user(s), please follow:
- Login your cPanel account.
- Click the link of MySQL Databases.
- Select username and MySQL Database under Grant all permissions on a MySQL database to a MySQL user.
- Click the "Grant Permissions" button.
- Repeat if you need to grant other MySQL users to use the database
- Done!
|
|
|
|
|

Information Center |
|

BackUp / Restore WebSite |
| Back Up / Restore Web |
|
|
| Back Up / Restore MySQL |
|
|
| |
| |
|