myBlog

Restore MySQL dari ibdata file

on May 28, 2012

Langkah merestore data dari ibdata file sbb :
1. Buka Command Prompt
2. Stop MySQL service
c:\Program Files\MySQL\MySQL Server X.X\bin>mysqladmin -u root -p shutdown
Jika account root tidak mempunyai password cukup hilangkan option -p
3. Backup file-file di folder C:\ProgramData\MySQL\MySQL Server X.X\data (Windows7 untuk versi windows lain silakan disesuaikan)
4. Copy file-file ibdata1, ib_logfile, .frm yang akan direstore ke folder C:\ProgramData\MySQL\MySQL Server X.X\data
5. Start MySQL service dengan option sebagai berikut
c:\Program Files\MySQL\MySQL Server X.X\bin>mysqld –standalone –console –innodb-force-recovery=4
Untuk MySQL versi 5.0 gunakan perintah mysqld-nt
6. Backup database
7. Stop kembali MySQL service seperti langkah nomor 2
8. Start MySQL service
c:\Program Files\MySQL\MySQL Server X.X\mysqld
Untuk MySQL versi 5.0 gunakan perintah mysqld-nt -u root
9. Restore database

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: