1,105,169 Community Members

backup all mysql databases xampp

Member Avatar
Junior Poster
191 posts since Sep 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]


i found this thread:


will this script backup all databases in the mysql directory?

what do you need to backup and restore all mysql databases in xampp? do i just copy and paste the directory to another location everyday or is there a particular way?

i know you can take backups in php my admin but you would have to do one after another which could be lengthy.

thanks for any help

Member Avatar
Veteran Poster
1,182 posts since Sep 2009
Reputation Points: 131 [?]
Q&As Helped to Solve: 193 [?]
Skill Endorsements: 13 [?]


MySQL has a build in application for both Linux and Windows called mysqldump that creates a text file with the SQL code needed to create the databases, tables, indexes, and insert the data back into your database. You can either export all databases or specific databases to a or several files. Usually I compress the file after creating it to save space.

I run the following every night to backup all databases:

/usr/bin/mysqldump -u root -pmysqlRootPW --all-databases > /var/www/html/txlinux.com/mysql_DB_backup

The big mistake people make is there is no space after the -p when putting in your password but there is a space after the -u for user name.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
Tags Related to this Article