Harsha M V
Harsha M V

Reputation: 54989

Backup Mysql Databases

I wanna reinstall windows on my PC i wanna backup my Databases in MySQL. I have around 30 plus databases. is there an easy way to back up the content and restore it later ?

Upvotes: 1

Views: 586

Answers (6)

Ashwin A
Ashwin A

Reputation: 3867

You can use SQLyog MySQL GUI to backup your database. It has scheduled backup(you can export data into a single file or as multiple files) and backup as SQL dump(The dump will contain SQL statements to create the table and/or populate the table) to take backup and can restore those .SQL files using Execute SQL script tool.

try the tool here.

Upvotes: 1

Nasir
Nasir

Reputation: 11451

You can use mysqldump -A to do generate sql dumps for all databases.

Reference: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Alternatively, you can also just copy the acutal data directory.

Edit: apologies for not being specific, as others have noted this will work only ISAM. For innodb, you'll need to backup using mysqldump or another utility such as phpMyAdmin.

Upvotes: 2

Anand Shah
Anand Shah

Reputation: 14913

Have you given the GUI tools a try?

http://dev.mysql.com/downloads/gui-tools/5.0.html

Have a look at the "Backup" option in the MySQL Administrator. The "Restore" option might also be helpful after the backup is done. :-)

Allows you to backup a single db or all db's at once.

Upvotes: 1

Jey
Jey

Reputation: 1511

go to phpmyadmin and export all the database.. After installing wamp in ur new pc.. go to import and import the files you've exported previously..

Upvotes: 1

Kusalananda
Kusalananda

Reputation: 15633

Use mysqldump to create a database dump of each database. You can later easily recreate the databases from these dumps by running them through mysql. This would be the most generic answer, knowing nothing more of your set-up.

Upvotes: 2

santiagobasulto
santiagobasulto

Reputation: 11726

If your databases contains MyISAM tables, then you could just copy the files. Otherwise (using INNODB) this doesn't work.

I assum you don't have the binary log activated, you should use mysqldump.

Take a look at: http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html

You could try with PHPMyADMIN if you don't feel confortable with mysqldump.

Upvotes: 1

Related Questions