I'm using bit(1) to represent a boolean but when I dump the table into a file using mysqldump, the outputted data doesn't appear in the format that I expect.
What I see in the table (phpMyAdmin):
0 1
What I see in the file (mysqldump):
SOH \0
What I see if I use the export feature of phpMyAdmin:
b'0' b'1'
Do I need to use a flag or is this a safe representation of the bit data type?
Add --hex-blob option to your mysqldump command.
It means dump binary columns using hexadecimal notation. Then it becomes human-readable in your file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With