Backup MySQL without running it (or any of XAMPP)

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Backup MySQL without running it (or any of XAMPP)

Postby sman789 » 25. December 2010 22:02

My laptop ran a local server on XAMPP with a few programs using MySQL installed on it, such as wordpress and PHPBB which I used mainly on just that laptop. The laptop is now unbootable and I intend to reinstall Ubuntu on it to fix it, wiping everything. The previous database backups are very outdated. so I was wondering if there was a way to backup the MySQL databases using just the filesystem access from an Ubuntu Live CD (as in, I can't run PHPMyAdmin to export them from within this live CD, or can I?)?
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Backup MySQL without running it (or any of XAMPP)

Postby greno » 26. December 2010 17:41

If your MySQL database is a part of your XAMPP installation then I would just tar up all of XAMPP and then untar it in the new installation.

old installation:
Code: Select all
tar czf PATH_TO_ARCHIVE.tgz  lampp -C /opt      #adjust paths as necessary from LiveCD


new installation:
Code: Select all
tar xzf PATH_TO_ARCHIVE.tgz -C /opt



-Gerry
greno
 
Posts: 54
Joined: 04. October 2006 19:25

Re: Backup MySQL without running it (or any of XAMPP)

Postby sman789 » 26. December 2010 18:58

I tried copying the lampp directory from the /opt directory on my HDD to /opt on the live cd's temporary filesystem. XAMPP loads fine with the usual commands, and PHP etc works. Unfortunatly, I get a "cannot connect to database" error from all the programs which use MySQL - PHPMyAdmin says "The server is not responding (or the local MySQL server's socket is not correctly configured)". It may be a permission problem, however, as the first error PHPMyAdmin gave was that the config.inc.php file was not readable - I fixed that one but maybe a similar problem is what's stoping mySQL?
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Backup MySQL without running it (or any of XAMPP)

Postby greno » 27. December 2010 00:03

It's probably trying to create the mysql socket somewhere on the LiveCD in a read-only filesystem and so it fails.

You've got the copy, now just reinstall and recreate your XAMPP in the new installation (not LiveCD) and it should work unless you had existing problems XAMPP problems.

-Gerry
greno
 
Posts: 54
Joined: 04. October 2006 19:25

Re: Backup MySQL without running it (or any of XAMPP)

Postby sman789 » 27. December 2010 04:46

It turns out there is nothing wrong with running it on the live cd, it was my fault it wasn't working as I just copied it over with nautilus. I tried putting it into a tar as you suggested and then extracting it on the live CD and it worked perfectly :) I then made database backups with PHPMyAdmin just to be on the safe side before I wiped the HDD and reinstalled Ubuntu.

Thankyou for your help :)
sman789
 
Posts: 8
Joined: 25. December 2010 21:57


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 18 guests