Current articles and info about the Internet

Monday, 21st May 2012

   home     about     authors     news     books     xml feed     sitemap     privacy     contact us

There are 9 users online

add to favorites
make home page


Blogosphere
Directories & Guides
E-Commerce/Online Marketing
Internet Business
Internet News & Events
Internet Security/Privacy
Internet Services
Internet Technology
Internet Tools & Programs
Online Recreation
Online Tips & Information
Online Websites/Stores
Social Networks
Web Development

Our Newsletter

Sign up for our free
Internet-Informant.com Ezine
Get all the latest Internet news delivered right to your mailbox.


First Name:

Your Email:



We will never rent, share or sell your name to anyone else... ever! We respect your privacy!
  Other Resources


For other sources of internet related news, tips, and information, visit our resources page

 

  Submit An Article


Would you like to have your article posted? Click Here


Good Site? Vote at:
Starting Point Directory
Directory

 

 
 
 
internet pic
world wide web pic
internet pic

Backing Up And Restoring Your MySQL Database
Added: 03/30/2004
Type: Summary
Viewed: 815 time(s)
[ Not Rated Yet ]

How would you rate this article:    Bad Good   Go » 
Backing Up And Restoring Your MySQL Database

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 < custback.sql

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


Article Pages:  1  



website pic
download pic
internet pic

  Article Comments   Add Comment | View All (0)
    There are currently no comments for this article.


Advanced Search
Recent News

Good Resources


Affiliate With Us
 


All content © 2012 Webmaster, Backing Up And Restoring Your MySQL Database :: Internet News and Articles.