|
MySQL DATABASE
Backing Up Your Database
There are two main ways to back up or restore a MySQL
database on our servers: via SSH Telnet access or the phpMyAdmin
interface.
If you need SSH Telnet access, just send us an
email with your request to be enabled for it, and if you'd like
more information about how to connect to our servers with it,
just visit our SSH Telnet support page. To access the phpMyAdmin
interface, click on the "mySQL" button on your One World Hosting
control panel.
How to back up a mySQL database using SSH Telnet:
Log into your account on our server and issue
the following command:
[This is all one command line!]
/usr/local/mysql/bin/mysqldump $databasename
-u $user -p$password > /home/$user/file.dump
$ indicates a variable, so instead of entering
$user, you'll enter your actual user name for your account.
Your mySQL username and password are usually the same as the
ones that you use to access your control panel.
For example, your actual command might look like
this:
/usr/local/mysql/bin/mysqldump joescars_com
-u frankie -p18circ > /home/joe/joesbackup.sql
How to restore a mySQL database using SSH Telnet:
Log into your account on our server and issue
the following command:
[This is all one command line!]
/usr/local/mysql/bin/mysql $databasename
-u $user -p$password < /home/$user/file.dump
Click on your database name shown on the upper
left.
Go to the section called "View dump (schema) of
database" and choose options for backing up structure only,
structure and data, or adding drop tables. To view what your
backup file will look like, click on the "Go" button. When you're
ready to send your back up to a file, check the send box and
click "Go", then follow the prompts for how to name the file
and where to send it.
How to restore a mySQL database using phpMyAdmin:
Click on your database name shown on the upper
left.
Locate your back up file for the database that
you want to restore. Open it and copy the entire contents.
Paste into the field called "Run SQL query/queries
on database yourdomain_com" and click the "Go" button.
MySQL LINKS:
MySQL Part 1 - Installing a MySQL Database
MySQL Part 2 - MySQL and PHP
|