| Author |
Message |
stocksy
Joined: 24 Feb 2006
Posts: 6
|
| Posted: Fri Feb 24, 2006 6:27 am Post subject: Importing a mysqldump with BLOBs |
|
|
Hello,
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:
Code: $ mysqldump -uroot -p --opt gallery > dump.sql
And to import it on the Linode:
Code: $ 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. |
|
| Back to top |
|
andrewjw
Joined: 30 Aug 2005
Posts: 28
|
| Posted: Fri Feb 24, 2006 7:25 am Post subject: |
|
|
How are you transferring dump.sql to your linode? Is something doing Windows->Unix line conversions on the data?
Andrew |
|
| Back to top |
|
stocksy
Joined: 24 Feb 2006
Posts: 6
|
| Posted: Fri Feb 24, 2006 7:57 am Post subject: |
|
|
andrewjw wrote: 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. |
|
| Back to top |
|
stocksy
Joined: 24 Feb 2006
Posts: 6
|
| Posted: Wed Mar 08, 2006 5:15 pm Post subject: Solved |
|
|
| Well, turns out there was nothing wrong with the MySQL database - I missed a setting in php.ini. Oops! |
|
| Back to top |
|
| |