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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

Your Answer


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