I am using XAMPP package in my own desktop with Window 7 as OS.
That means I'm using MySQL DB and Apache server.
Now I would like to copy/migrate my whole MySQL DB to my friend's desktop, which is also with Window as OS, and also using XAMPP package.
Is there any way for me to do that?
Copy database files from MySQL folder (under old xampp folder) except share,bin, and script folder see attached image to see which files need copy (only files with in green box) and replace all these database files in new installed xampp directory in MySQL folder.
Restart xampp start MySQL and open database and table to make sure its working.
Yes.
You can use the command line tool mysqldump
Saving your database
mysqldump -u[yourusername] -p[yourpassword] --all-databases > mydump.sql
Reading it back in:
mysql -u[yourusername] -p[yourpassword] < mydump.sql
I'm assuming the mysql bin directory is accessible via command line. [yourusername] and [yourpassword] should be written without the brackets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With