Backing up a MySQL Database
There are
two ways to back up or restore a MySQL database on the servers:
via SSH Telnet access or the phpMyAdmin interface.
Please see SSH section of the Knowledgebase
to the procedure for obtaining SSH access.
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
How to
back up a mySQL database using phpMyAdmin
- 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 Resources
DevShed - MySQL
DevShed - Open Source web development tutorials, forums, and
tools. Topics covered include PHP, Apache, mySQL, Zope, Roxen,
Jserv, Zend, XML, DHTML, Javascript and more.
General Resources
Installing MySQL on Windows
Installing MySQL on Windows and working with it.
OxyScripts.com
Forums » PHP/MySQL Troubleshooting
A PHP - MySql Troubleshooting Forum.
PHPBuilder.com - forum list
Very active forum with categories for PHP and database questions.
PHP/MySQL Tutorial
In the first installment of this three-lesson tutorial, the
Kiwi guide covers everything you need to know to begin developing
database hubs.
PHP Tutorials
PHP is a tool that lets you create dynamic web pages. PHP-enabled
web pages are treated just like regular HTML pages and you
can create and edit them the same way you normally create
regular HTML pages.
Setting
Up a MySQL Based Website
Setting up a database backend is one of the important and
sometimes difficult things to do with your web site. Lucky
for you, we have this series of tutorials that will guide
you through the basics of building a database backend using
MySQL. In part one of this series on MySQL and its use as
a web backend, we look at basic installation and coding a
Perl / MySQL guestbook.
WebmasterBase - PHP and MySQL
WebmasterBase.com - With a vast variety of web design tutorials
and articles coupled with a vibrant and well informed community,
WebmasterBase the natural place to go to grow your online
business.
|