MySQL – Dump all databases

If you ever need to backup all your MySQL databases at the same time use the following command

mysqldump -u root -p –all-databases –skip-lock-tables > <path>/allsqldump.sql

If you encounter the following error:

myite-mysql-lock-error

Error: MySQL – mysqldump: Got error: 1016: Can’t open file: ‘./yourdatabase/xxx.frm’ (errno: 24) when using LOCK TABLES

mysqldump -u root -p –all-databases –lock-tables=false > <path>/allsqldump.sql

Tested Platforms
Windows 2008 R2
MySQL v5.x

Leave a Reply