Home
  Directory of Free Articles
  Submit and Receive Articles Free
Submit your Articles Free 
Retrieve Free Artices for your WebSite  

SUBMIT YOUR ARTICLE chessbaron.co.uk | www.fine-jewellery-boxes.com | Private Equity

Can't find what you're looking for? Search:


4282 - Backing Up And Restoring Your MySQL Database


Backing Up And Restoring Your MySQL Database

by: Vinu Thomas


If you've been using MySQL database to store your important data, it is imperative that you make a backup of your data to prevent any loss of data. This article shows you how to backup and restore data in your MySQL database. This process can also be used if you have to move your data to a new server.
Backing up your database
The quickest and easiest way to backup and restore your database would be to use MySQLDump. If you've got shell or telnet access to your server, you can backup MySQL data by issuing the mysqldump command. The syntax for the command is as follows.
mysqldump -u [uname] -p [pass] [dbname] > [backupfile.sql] [uname] - this is your database username [pass]- this is the password for your database [dbname] - the name of your database [backupfile.sql] - the filename for your database backup
To backup your database 'Customers' with the username 'sadmin' and password 'pass21' to a file custback.sql, you would issue the command
mysqldump -u sadmin -p pass21 Customers > custback.sql
Issuing this command will backup the database to custback.sql. This file can be copied to a safe location or a backup media and stored. For more information on MySQLDump, you can check out : http://www.mysql.com/doc/en/mysqldump.html
Restoring your database
If you have to re-build your database from scratch, you can easily restore the mysqldump file by issuing the following command. This method will not work if the tables already exist in your database.
mysql - u sadmin -p pass21 Customers If you need to restore existing databases, you'll need to use MySQLImport. The syntax for mysqlimport is
mysqlimport [options] database textfile1
To restore your previously created custback.sql dump back to your Customers Database, you'd issue
mysqlimport -u sadmin -p pass21 Customers custback.sql
For more information on MySQLImport, you can check out : http://www.mysql.com/doc/en/mysqlimport.html





About The Author


Vinu Thomas is a consultant on Webdesign and Internet Technologies. His website is http://www.vinuthomas.com. You can discuss about this article or any PHP/MYSQL related issues in our Discussion Forums: http://www.vinuthomas.com/forum2.html






This article was posted on March 01, 2004







Free Articles Content is King - Get better SEO and search engine traffic by articles from TooBoring Inc.

Now on

TooBoring Inc. Categories: Home | Chess | Coping with Grief | Sales | Marketing | Public Speaking | Auto and Trucks | Business and Finance | Computers and Internet | Education | Family | Food and Drink | Gadgets and Gizmos | Health | Hobbies and Interests | Home Improvement | Humor | Kids and Teens | Legal | Men | Music and Movies | Online Business | Parenting | Pets and Animals | Politics and Government | Recreation and Sport | Relationships | Religion | Self Improvement And Motivation | SEO and Site Promotion | Travel and Leisure | Web Design and Development | Women | Writing

submit articles                   Other Sites  |  Visitor Stats  |  Contact
“Baron Turner (also known as Barry) is a participant in the Amazon Europe S.à r.l. Associates Programme, an affiliate advertising
programme designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.co.uk, Javari.co.uk.”