Blog

Export all MySQL Databases – Windows (WAMP)

Have you ever wanted to export all your databases at one time? It’s quite handy for backup purposes or if you’re moving your development environment to a new computer. It’s not all that hard to do, but I didn’t find all that much clear information out there for those of us who aren’t server geeks. So here is what I do, hope this helps you!

Command Prompt

You need to setup the path to mysqldump so you can run it from Command Prompt. (Get to Command Prompt by searching for “cmd” in your Start Menu).

Set the path by doing something like this (you have to confirm and adjust based on the location of your mysql files):

set path=c:/wamp/bin/mysql/mysql5.5.24/bin/

Run MySQLDump

Now that the path is all setup, it’s easy going! Some notes… “root” is probably your user name unless you created / changed the master DB user. You may or may not have root password. If not, just omit the entire “-p….” section. Then set the location and file name you want for the SQL dump. And you are done!

mysqldump -u root -pmyppassword --all-databases > /temp/all-database.sql

One Response to “Export all MySQL Databases – Windows (WAMP)”