I exported my database with JSON columns in it. After I migrated to a new server, my import crashed every time with an error like:
cannot create a JSON value from a string with CHARACTER SET 'binary'
On stackoverflow, I found this post but didn't work for me: mysqlimport issues "set @@character_set_database=binary" which prevents loading json values
The file is 2GB and isn't possible to open the file.
Anyone has an idea to import my database file?
sed
version:sed -E "s/(X'[^,\)]*')/CONVERT(\1 using utf8mb4)/g" infile.sql > outfile.sql
– Winser