1.11M Members

backup all mysql databases xampp

 
0
 

hi

i found this thread:

http://www.daniweb.com/forums/thread197057.html

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

 
0
 

Hello,

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.

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