且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

备份Mysql数据库

更新时间:2022-11-25 12:52:44

您可以使用mysqldump -A为所有数据库生成sql转储.

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

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

或者,您也可以只复制实际数据目录.

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

抱歉,没有具体说明,正如其他人指出的那样,这仅适用于ISAM.对于innodb,您需要使用mysqldump或其他实用程序(例如phpMyAdmin)进行备份.

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.