Last Updated: February 25, 2016
·
1.321K
· drewblas

Find all tables that have a non-utf8 collation or encoding

SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE 
    COLLATION_NAME IS NOT NULL AND 
    COLLATION_NAME <> 'utf8_general_ci' AND 
    COLLATION_NAME <> 'utf8_unicode_ci' AND 
    COLLATION_NAME <> 'utf8_bin';