Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

i am trying to dump a particular row using java.

So that i retrieve the data by using record sets and i manually written sql script code by appending the dynamic records.

But my problem is i could not write the script for blob data fields.

Because there are some special characters are present inside blob type fields.

i need to know how mysqldump.exe is replacing special characters ?

If i know the detail means i can replace those characters as same as mysqldump process.

share|improve this question

migrated from Feb 6 '12 at 15:26

This question came from our site for professional and enthusiast programmers.

1 Answer 1

There are two ways: string and hexadecimal notation, e.g.:

  • 'abc\' as string will be like this -> 'abc\\', all special characters are escaped
  • 'abc\' as hexadecimal will be like this -> 0x6162635C, you can test it using HEX function - SELECT HEX('abc\\');

You can choose one of those methods. Also, try to play with --hex-blob option and check results.

share|improve this answer
+1 for --hex-blob – RolandoMySQLDBA Feb 6 '12 at 15:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.