splash
Ardiansyah
A Father of three children, and wants to lead all of the family to reach the highest location in Jannah
Dari Ibnu Abbas ia berkata, "Dahulu aku pernah berada di belakang Rasulullah, lalu beliau bersabda: "Wahai anak kecil sesungguhnya aku ingin mengajarimu beberapa kata, jagalah Allah, maka pasti Allah menjagamu, jagalah Allah pasti kau akan menjumpai-Nya dihadapanmu. Apabila engkau meminta maka mintalah kepada Allah dan jika engkau meminta pertolongan maka mintalah pertolongan kepada Allah. Ketahuilah, seandainya suatu umat berkumpul untuk memberikan manfaat kepadamu maka mereka tidak bisa memberi manfaat tersebut kecuali yang telah ditakdirkan Allah untukmu dan apabila mereka berkumpul untuk memadharatkanmu maka mereka tidak bisa memadharatkanmu kecuali dengan apa-apa yang ditakdirkan oleh Allah atasmu, telah diangkat pena dan telah kering tinta" (HR. Tirmidzi, hasan shohih)
 

Backup and Restore MySQL Database

Posted By ariandita on December 20th, 2012

Hi there . . . .
As System Administrator we need to maintain Database Server, whether it’s open source or proprietary. I am using MySQL Server as database backend of Wordpress, and one day a notification showed up, tell me that the newest Wordpress had been released.
Wow it’s time to upgrade, but the notification also tell me to backup database and content first before upgrading, so I have to google to find out how to backup and restore a MySQL databse, I remembered that the last time I google I’ve found it in the most incredible blog about Linux, The CyberCiti, but I couldn’t find it now, I found the solution from thegeekstuff.com instead.

  1. How to backup
    Backup MySQL database can be done with two ways that I could find in thegeekstuff.com,

    • first with the mysqldump syntax
    • and the mysqlhotcopy syntax

    I choose to backup with mysqldump syntax, which is
    mysqldump -u username -p username_password MySQL_database_name > dumpfilename.sql

  2. How to Restore
    to restore from dumpfile we can use this syntax
    mysql -u username -p username_password MySQL_database_name < dumpfilename.sql

The backup progress sometime get failed with this notification

mysqldump: Got error: 1016: Can’t open file: ‘./databasename/tablename.frm’ (errno: 24) when using LOCK TABLES

Use these additional parameter to the backup command –skip-lock-tables or –lock-tables=false

That’s it, than I backed up the Wordpress content with tar -cvf
OK than, I’ve upgraded the Wordpress to the newest version, which is 3.5
Happy Administer System !

BERITA BINUS : Apple opens Developer Academy in Indonesia

Similar Posts

One Response to “Backup and Restore MySQL Database”

welly iskand

@admin Minta tolong tambahkan plugin syntaxhighlighter dong, admin Terkadang ingin menulis potongan source code, agar tampilannya lebih enak dilihat. http://wordpress.org/extend/plugins/syntaxhighlighter/ Terima kasih
sperti ini http://blogs.itb.ac.id/activity/p/17621/

Leave a Reply