splash
Ardiansyah
A Father of four 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 kalimat, jagalah Allah, maka pasti Allah menjagamu, jagalah Allah pasti kau akan dapati Allah 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 akan bisa memberi manfaat tersebut kecuali yang telah Allah takdirkan untukmu dan apabila mereka berkumpul untuk memadharatkanmu maka mereka tidak akan bisa memadharatkanmu kecuali dengan apa-apa yang Allah takdirkan atasmu, telah diangkat pena dan telah kering lembaran-lembaran(takdir)" (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
    [code language=”bash”]
    mysqldump -u username -p username_password MySQL_database_name > dumpfilename.sql
    [/code]

  2. How to Restore
    to restore from dumpfile we can use this syntax
    [code language=”bash”]
    mysql -u username -p username_password MySQL_database_name < dumpfilename.sql
    [/code]

The backup progress sometime get failed with this notification

[code language=”bash”]
mysqldump: Got error: 1016: Can’t open file: ‘./databasename/tablename.frm’ (errno: 24) when using LOCK TABLES
[/code]

Use these additional parameter to the backup command
[code language=”bash”]
–skip-lock-tables
[/code]
or
[code language=”bash”]
–lock-tables=false
[/code]

That’s it, than I backed up the WordPress content with
[code language=”bash”]
tar -cvf
[/code]
OK than, I’ve upgraded the WordPress to the newest version, which is 3.5
Happy Administer System !

Similar Posts

Leave a Reply