Binary data mysqldump and restore.

2002-06-24 Thread Mark Williams (MWP)

Hi all...

!! First, can you CC to [EMAIL PROTECTED], as im not on the mailing list.

I have a few tables which are storing a few MB of binary data (like jpegs).
I can dump the db fine using mysqldump, but on doing a mysql ...  dumpfile i get 
many errors, as it seems mysql isnt accepting the binary data in the dump file.

I get hundreds of errors like:
ERROR:
Unknown command '\Z'.
ERROR:
Unknown command '\0'.
ERROR:
Unknown command '\Z'.
ERROR:
Unknown command '\0'.
ERROR:
Unknown command '\'.
ERROR 1064: You have an error in your SQL syntax near 'GIF89a2\02\0÷ÿ\0\0\0\0ÀÀÀ\0\0

\Z\0\Z 0\
INSE' at line 1
Query OK, 0 rows affected (0.00 sec)

Query OK, 1 row affected (0.01 sec)

So how do i do this?

Thanks,
 MWP

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




FW: Binary data mysqldump and restore.

2002-06-24 Thread Bert VdB

Just for those people who have the same problem:

-Original Message-
From: Mark Williams (MWP) [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:13
To: Bert VdB
Subject: Re: Binary data mysqldump and restore.


That did it thanks!

MWP

 Hi,
 
 Have you tried making a dump with the --opt option ?
 
 CB.
 
 -Original Message-
 From: Mark Williams (MWP) [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 09:57
 To: [EMAIL PROTECTED]
 Subject: Binary data mysqldump and restore.
 
 
 This message uses a character set that is not supported by the Internet
 Service.  To view the original message content,  open the attached
message.
 If the text doesn't display correctly, save the attachment to disk, and
then
 open it using a viewer that can display the original character set. 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Binary data mysqldump and restore.

2002-06-24 Thread Francisco Reinaldo

If I remember correctly from the manual, you can dump
your data generating the SQL statements (this is what
you are doing) and your file will have a bunch of
INSERTS. Your problem is that those inserts will have
something like SET YourBinaryField =
'a-bunch-of-characters'. The problem is that some of
the binary data could make the insert impossible to be
executed. What I would try is to export the data as a
delimited file, then you will have to files, one with
your database structure (that you will run first) and
another one with the data (delimited by something).
Take a look on the manual about this and good luck!
--- Mark Williams (MWP) [EMAIL PROTECTED]
wrote:
 Hi all...
 
 !! First, can you CC to [EMAIL PROTECTED], as
 im not on the mailing list.
 
 I have a few tables which are storing a few MB of
 binary data (like jpegs).
 I can dump the db fine using mysqldump, but on doing
 a mysql ...  dumpfile i get many errors, as it
 seems mysql isnt accepting the binary data in the
 dump file.
 
 I get hundreds of errors like:
 ERROR:
 Unknown command '\Z'.
 ERROR:
 Unknown command '\0'.
 ERROR:
 Unknown command '\Z'.
 ERROR:
 Unknown command '\0'.
 ERROR:
 Unknown command '\'.
 ERROR 1064: You have an error in your SQL syntax
 near 'GIF89a2\02\0÷ÿ\0\0\0\0ÀÀÀ\0\0
 
\Z\0\Z 0\
 INSE' at line 1
 Query OK, 0 rows affected (0.00 sec)
 
 Query OK, 1 row affected (0.01 sec)
 
 So how do i do this?
 
 Thanks,
  MWP
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php