Exporting from SqueezeCenter's Embedded MySQL Instance
There aren't any MySQL tools installed with SqueezeCenter and so you can't easily dump the database. Instead, you'll need to copy your actual database files and send me those. Where the database files live depends on the platform you're running SqueezeCenter on.
Linux/Mac? OS X
Where the raw database files are located depends on your Linux/Mac? OS X distribution and which SqueezeCenter distribution you've installed. However, it's likely to be in one of the following directories:
- /var/cache/SqueezeCenter/MySQL
- /usr/local/SqueezeCenter/Cache/MySQL
You can tell you've got the right directory because it will contain files with names such as ibdata1, ib_logfile0 and subdirectories with the names mysql and squeezecenter.
To grab the files do the following:
- Stop SqueezeCenter (this is very important because the files must not change during the copy).
- Create an archive with a command such as the following (replace the path to the database files with the correct path for your installation):
tar czvf /tmp/database.tgz /var/cache/squeezecenter/MySQL
- Send me the archive you created in the file /tmp/database.tgz (see below for information on sending large files).
Microsoft Windows
The raw database files are stored in the following location:
- C:\Program Files\SqueezeCenter\server\Cache\MySQL
You can tell you've got the right directory because it will contain files with names such as ibdata1, ib_logfile0 and subdirectories with the names mysql and squeezecenter.
To grab the files do the following:
- Stop SqueezeCenter (this is very important because the files must not change during the copy).
- Create an archive (ZIP or similar - I can cope with pretty much anything), and add the whole of the C:\Program Files\SqueezeCenter\server\Cache\MySQL directory tree to it (ie including all files and subdirectories).
- Send me the archive you created (see below for information on sending large files).
Exporting from your own MySQL Instance
If you're running your own MySQL instance and not using SqueezeCenter's own instance (which will be the case if you've followed the SlimDevices:ExistingMySQLInstance guide in the Slim Devices wiki), then you can export the database to a single file.
Instructions vary depending on your platform so use the appropriate instructions below.
Linux/Mac? OS X
Do this following:
- Make sure the MySQL server is running (it doesn't matter whether SqueezeCenter is running or not);
- Create a dump of the SqueezeCenter database with a command such as the following (where root_password is the password for the MySQL root user):
mysqldump --user=root --password=root_password squeezecenter| gzip > /tmp/database.gz
- Send me the database dump you created in the file /tmp/database.gz (see below for information on sending large files).
Microsoft Windows
The pathnames listed below assume a standard installation of !MySQL as download from http://www.mysql.org/downloads - packaged versions of MySQL obtained from other sources may use other pathnames and so you'll have to adapt these instructions appropriately.
Do the following:
- Open a command window (Start->All Programs-->Accessories-->Command Prompt);
- Change directory to that containing the MySQL binaries with a command like the following:
cd "C:\Program Files\MySQL\MySQL Server 5.0\bin"
- Create a dump of the SqueezeCenter database with the following command (where root_password is the password for the MySQL root user):
mysqldump --user=root --password=root_password --result-file=c:\database.sql squeezecenter
- Send me the database dump you created in the file C:\database.sql (see below for information on sending large files). If the file is very large you might want to compress it into an archive before sending it (I can manage any kind of archive).
Sending Very Large Files
Database files and exports are likely to be very large, and may be too large for you to email (I can receive email attachments of any size, however, so if you can email it then that's probably the easiest way). If you can't email it, however, you can use a third-party web service to help.
In the past I've used http://www.transferbigfiles.com for this purpose and it has worked well. If you've another service you're comfortable using then go ahead and use that, though.
Whether you email it or use a web service, please use the email address stuart@… to be sure I receive it.
