简体   繁体   中英

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 ?

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.

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.

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.

去phpmyadmin并导出所有数据库。在新电脑上安装wamp之后。去导入和导入以前导出的文件。

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM