Sunday, February 7, 2010

Backup MySQL Database to a file

<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flpilinux.com%2Fbackup-mysql-database-to-a-file.html"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flpilinux.com%2Fbackup-mysql-database-to-a-file.html" height="61" width="51" /></a></div><p>&#8220;Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.</p>
<p>Syntax:</p>
<p> mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql</p>
<p>Example:</p>
<p> mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql</p>
<p>This will give you a text file containing all the commands required to recreate the database.&#8221;<a rel="nofollow" href="http://www.howtogeek.com/howto/mysql/backup-mysql-database-to-a-file/">howtogeek.com</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Flpilinux.com%2Fbackup-mysql-database-to-a-file.html&amp;linkname=Backup%20MySQL%20Database%20to%20a%20file" ><img src="http://lpilinux.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

No comments:

Post a Comment