Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL blob dump to tab delimited files
    primarykey
    data
    text
    <p>I am migrating a MySQL 5.1 database in Amazon's EC2, and I am having issues tables with longblob datatype we use for image storage. Basically, after the migration, the data in the longblob column is a different size, due to the fact that the character encoding seems to be different.</p> <p>First of all, here is an example of before and after the migration:</p> <p>Old:</p> <pre><code>x??]]??}?_ѕ??d??i|w?%?????q$??+? </code></pre> <p>New:</p> <pre><code>x��]]����_ѕ��d��i|w�%�����q$��+� </code></pre> <p>I checked the character set variables on both machines and they are identical. I also checked the 'show create table' and they are identical as well. The client's are both connecting the same way (no SET NAMES, or specifying character sets).</p> <p>Here is the mysqldump command I used (I tried it without --hex-blob as well):</p> <pre><code>mysqldump --hex-blob --default-character-set=utf8 --tab=. DB_NAME </code></pre> <p>Here is how I loaded the data:</p> <pre><code>mysql DB_NAME --default-character-set=utf8 -e "LOAD DATA INFILE 'EXAMPLE.txt' INTO TABLE EXAMPLE;" </code></pre> <p>Here are the MySQL character set variables (identical):</p> <p>Old:</p> <pre><code>+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ </code></pre> <p>New:</p> <pre><code>+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ </code></pre> <p>I'm not sure what else to try to be able to run mysqldump and have the blob data be identical on both machines. Any tips would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload