Skip to content

Instantly share code, notes, and snippets.

@xavivars
Created October 30, 2015 06:18
Show Gist options
  • Save xavivars/038c734a7850ea07563c to your computer and use it in GitHub Desktop.
Save xavivars/038c734a7850ea07563c to your computer and use it in GitHub Desktop.
Fix XV Random Quotes table collation
use wordpress;
show full columns from wp_stray_quotes;
alter table wp_stray_quotes change quote quote VARCHAR(100) character set latin1;
alter table wp_stray_quotes change quote quote VARBINARY(100);
alter table wp_stray_quotes change quote quote VARCHAR(100) character set utf8mb4 COLLATE utf8mb4_unicode_ci;
alter table wp_stray_quotes change author author VARCHAR(100) character set latin1;
alter table wp_stray_quotes change author author VARBINARY(100);
alter table wp_stray_quotes change author author VARCHAR(100) character set utf8mb4 COLLATE utf8mb4_unicode_ci;
alter table wp_stray_quotes change `source` `source` VARCHAR(100) character set latin1;
alter table wp_stray_quotes change `source` `source` VARBINARY(100);
alter table wp_stray_quotes change `source` `source` VARCHAR(100) character set utf8mb4 COLLATE utf8mb4_unicode_ci;
alter table wp_stray_quotes change category category VARCHAR(100) character set latin1;
alter table wp_stray_quotes change category category VARBINARY(100);
alter table wp_stray_quotes change category category VARCHAR(100) character set utf8mb4 COLLATE utf8mb4_unicode_ci;
alter table wp_stray_quotes change visible visible VARCHAR(100) character set latin1;
alter table wp_stray_quotes change visible visible VARBINARY(100);
alter table wp_stray_quotes change visible visible VARCHAR(100) character set utf8mb4 COLLATE utf8mb4_unicode_ci;
alter table wp_stray_quotes change user user VARCHAR(100) character set latin1;
alter table wp_stray_quotes change user user VARBINARY(100);
alter table wp_stray_quotes change user user VARCHAR(100) character set utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE wp_stray_quotes CHARACTER SET utf8mb4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment