Released On 05-22-2009
A large percentage of websites are operated on LAMP (Linux, Apache, MySQL, and PHP). Since it's so prevalent within most web applications, there have been tools that make your MySQL database management much easier. One of these tools is a PHP script called phpMyAdmin.
The primary goal of phpMyAdmin is to give webmasters the ability to edit and browse MySQL code within a browser. Most website control panels will offer this application, but on other servers, you'll have to install the application yourself. This article does not discuss the installation procedure but instead explains how you can back up and restore your databases using this powerful tool.
Sometimes, you just need to back up your database. It can be growing substantially and you may not have confidence in your backup solution. It is always a good idea to have a local copy of your website files, database and all. You can simply grab data off FTP, but the database is a completely separate entity. Therefore, phpMyAdmin comes into play.
To back up your database, follow these steps:
1. Load your phpMyAdmin page. Your control panel may have a link directly to the application, but if you have a fresh install, it may be in a directory that you've chosen.
2. On the left hand navigational bar, you'll see a number of databases (if you have more than one). Click on the database that you'd like to back up. (Note: The parentheses indicate the numbers of tables that are located within the database.)
3. At the top of the screen, click the Export link.
4. Scroll down and you'll see an option to Save as File
5. Click the Go button.
6. You'll be prompted to download a file, usually called localhost.sql.
This file is a plain text file that includes MySQL code. If you take a look at it, you can even learn a thing or two about some MySQL commands. You can make edits to this file (if necessary) and re-import it back to your website.
Now what if you've lost your database (it was corrupted) or you made changes and you want to restore it? Easy. Here are the steps you should follow.
1. Load your phpMyAdmin page.
2. Choose your database from the left-hand navigational bar.
3. If you're replacing your current database, you must drop all the tables first. This will prevent duplicate entry errors. Make sure to individually check off all of the tables that you're dropping. Choose Drop from the With Selected drop down box.
4. Now you're ready to restore your SQL file. Select the SQL link on phpMyAdmin's top navigational bar.
5. Click on Browse and locate the SQL file that you created.
6. Click Go.
That's it. You're done!
If you're not comfortable doing this with a live database, play around with it and phpMyAdmin first. You'll feel a lot more confident if you familiarize yourself with the powerful features available to you in the toolkit.
by tamar
Top rated articles in "Hosting & Security"
| Webmaster Resources Marketplace: |
| Software Development Company | Webhosting.UK.com |
| Web Templates | Text Link Brokers | Stock Photos |