HomeMySQL Page 4 - Backing Up and Restoring Your MySQL Database
PHPMyAdmin - MySQL
Do you need to change your web host or switch your database server? This is probably the only time when you really think of backing up your MySQL data. If you've got a website with a database or your custom database running for your applications, it is imperative that you make regular backups of the database. In this article, I will outline two easy ways of backing up and restoring databases in MySQL.
PHPMyAdmin is an easy to use web-interface to control MySQL databases. You can run this from any system which has a web server which runs PHP scripts. PHPMyAdmin also lets you administer multiple database servers using the same interface. If you don't have telnet or shell access to your database server, this is probably how you would be administering your databases. If you haven't used PHPMyAdmin, head over to http://www.phpmyadmin.net/ and download the latest version to experiment with.
Before I go on to show you how you can back up and restore your databases using PHPMyAdmin, let me take a little while to show those who going to be first time users of PHPMyAdmin how to configure their installation. Once you've downloaded the latest version of PHPMyAdmin, copy the files from the installation source to your web server. Before you run the program, you'll have to edit a few lines in config.inc.php to get your installation to work properly. You can find this file in the root folder of the installation.
Head over to the line which reads:
$cfg['PmaAbsoluteUri'] = '';
Change this to the web URL of the installation. Let's say you've copied the files to the directory 'phpmyadmin' under the URL 'http://dbserver.com', you should change the option to:
Here are some more options about your database server which you'll have to modify before you save the configuration file. Let's say you have to connect to your database server, which is residing at 22.214.171.124 and connects on port 432, with the username 'jester' and password 'freddy32', the options you have to change will look like this: