Software Information

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

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


MORE RESOURCES:

On-Demand Software Takes Off, But Investors Should Be Wary
CNNMoney.com - 7 hours ago
SAN FRANCISCO -(Dow Jones)- The concept of software as a service is shaking up corporate computing. But shares of companies providing pay-as-you-go ...
Dell and Salesforce.com: So cozy they could merge (someday) ZDNet
all 2 news articles


CAST to Present at World Congress for Software Quality
MarketWatch - 7 hours ago
Different sources of business value will be related to different aspects of software quality such as robustness, maintainability, security, and other such ...


CartoPac Field Solutions Unveils Enhanced Version of CartoPac Software
MarketWatch - 1 hour ago
CartoPac's customized solutions, which include hardware, software, service and training, simplify every aspect of mobile asset management, from data capture ...


Los Angeles Times

Software for supervising students
Los Angeles Times, CA - 12 hours ago
Here's an overview of some of the more popular programs: MealpayPlus: A program from Horizon Software International that lets parents go online to put money ...
Online tools let parents peer into their kids' school day Los Angeles Times
all 6 news articles


Sun to craft software stack into NAS appliances
InfoWorld, CA - 7 hours ago
By Stephen Lawson, IDG News Service Sun Microsystems will introduce a storage appliance based on its FISHworks software package by the end of this year and ...


Media Advisory: Harte-Hanks Trillium Software(R) Sponsors TDWI's ...
CNNMoney.com - 5 hours ago
Trillium Software, a business of Harte-Hanks (NYSE: HHS) and a leading enabler of Total Data Quality solutions, is sponsoring The Data Warehousing ...


Times Online

Open Sauce Software
ZDNet UK, UK - 10 hours ago
Chrome is still my default browser, and there are everyday things I can't do so easily in it as in Firefox. Perversely. I think what I want is a Google ...
Video: Tech Test: Google Chrome Lacks Polish AssociatedPress
Google Chrome: A Hit with Online Software Vendors CIO
Google sees new browser displacing desktop software Reuters
MarketWatch - InformationWeek
all 3,448 news articles


Earthtimes (press release)

Take-Two Goes Full Speed Ahead
Forbes, NY - 2 hours ago
Take-Two Interactive Software's quarterly results ripped through estimates as sales of the company's notorious game Grand Theft Auto IV helped revenue more ...
Take-Two Interactive Software swings to profit in Q3; guides Q4 ... RTT News
Grand Theft sales boost Take-Two profit Globe and Mail
Grand Theft Auto Lifts Take-Two Wall Street Journal
MarketWatch - Reuters
all 54 news articles


New Agreement Will Focus Development Teams from Translations.com ...
MarketWatch - 24 minutes ago
In the near future, corporate customers, agencies, and end-users can expect a far better user experience than the translation-related software tools market ...


Smith Micro Software, Inc. Q2 2008 Earnings Call Transcript
Seeking Alpha, NY - 1 hour ago
Good afternoon and thank you for joining us today to discuss Smith Micro Software’s financial results for fiscal 2008 second quarter, which ended June 30, ...
Take-Two Interactive Software, Inc. Reports Record Third Quarter ... Centre Daily Times
SeaChange International Announces Second Quarter Fiscal 2009 Results MarketWatch
Cooper Co Drops, Quiksilver, Take-Two Rise 123Jump.com
MarketWatch - MarketWatch
all 218 news articles

Software - Google News

home | site map
© 2006