Backing Up And Restoring Your MySQL Database - myoddPc

Computer Information - myOddPc

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 databaseThe 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 backupTo backup your database 'Customers' with the username 'sadmin' and password 'pass21' to a file custback.sql, you would issue the commandmysqldump -u sadmin -p pass21 Customers > custback.sqlIssuing 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.htmlRestoring your databaseIf 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.sqlIf you need to restore existing databases, you'll need to use MySQLImport. The syntax for mysqlimport ismysqlimport [options] database textfile1To restore your previously created custback.sql dump back to your Customers Database, you'd issuemysqlimport -u sadmin -p pass21 Customers custback.sqlFor more information on MySQLImport, you can check out : http://www.mysql.com/doc/en/mysqlimport.htmlAbout The AuthorVinu 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

Vinu Thomas

Sony PSP - Not Just For Games

Zen and the Art of Buying Computer Parts
The Ugly Face Of Technology
Wind Turbine Lights to Protect Birds
Robotic Manufacturing Lighting
Is that software really free?
Tips on Finding the Best CD Duplication Services
Making the Most of Digital Camera Memory Cards
Microsoft Dynamics GP & CRM in Transportation & Logistics
Computer Dos and Donts
Sony PSP - Not Just For Games

SyncUp – A File/Folder Synchronizer For Windows

Basic Tips and tricks for Windows XP
Buying the Perfect Computer – The FIRST Time
Dirty Little Computer Viruses and How To Protect Yourself
10 Secrets to a Healthy Computer and a Happier You
8 Simple Ways to Defend Against Evil Doers Both Online and Off
Microsoft CRM Programming Secrets – Tips For Developers
Microsoft Great Plains Integration with Legacy Systems – Overview For Developer
Microsoft RMS – Great Plains Integration – Overview For IT Specialist
Removing Incoming Email in MS Exchange, C# Example
SyncUp – A File/Folder Synchronizer For Windows

Articles by the same author

Backing Up And Restoring Your MySQL Database

Disclaimer

Please note that this website is for information only. Whilst every care has been taken to provide accurate information you should always seek the advice of a professional before attempting any repairs or making any purchase(s).
You need to take special care to ensure that the information given applies your system.

Mortgage
Mortgage help and advice from Moneyweb, the UK mortgage experts.

Personal Injury Attorney Los Angeles
View this video to see one of the best personal injury firms you could possibly hire in Los Angeles, CA.
marker About Us | Site Map | Privacy Policy | Contact Us | ©2005-2006