Importing a mysqldump with BLOBs
I have a MySQL database which stores images as BLOBs. At present, the database is running on a Mac OS X host with MySQL 4.1.12 installed. I am trying to move the database to my Linode running Debian Sarge with MySQL 4.1.11.
I am using this command to dump the database:
$ mysqldump -uroot -p --opt gallery > dump.sql
And to import it on the Linode:
$ mysql -uroot -p --execute="create database gallery;"
$ mysql -uroot -p -e 'source dump.sql'
No errors are reported, but when I look at the images in the database, the appear corrupt (lots of ? characters).
I also tried just shutting down MySQL and copying the data directory over - same effect.
Any advice?
James.
3 Replies
Andrew
@andrewjw:
How are you transferring dump.sql to your linode? Is something doing Windows->Unix line conversions on the data?
I'm just using scp to copy the dump directly from one server to the other - no text mangling involved.
For the record, if I transfer an 'ordinary' database, that is to say one without BLOBs, it imports with no problems.
James.