Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- error Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '='
- -- solusi, samakan collations tabel yang beda, samakan dengan collation table yang di information_chema
- -- lihat dulu collation semua table
- SELECT table_schema, table_name, column_name, character_set_name, collation_name
- FROM information_schema.columns
- WHERE collation_name = 'latin1_general_ci'
- ORDER BY table_schema, table_name,ordinal_position;
- -- ubah collation tabel yang dipilih
- ALTER TABLE tbl_name CONVERT TO CHARACTER SET latin1 COLLATE 'latin1_swedish_ci';
- -- contoh case error
- -- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat'
- -- solusi:
- ALTER TABLE <tabel terkait> CONVERT TO CHARACTER SET utf8 COLLATE 'utf8_general_ci';
- -- find out the charset used in the server
- SHOW VARIABLES LIKE 'character_set%';
- SHOW VARIABLES LIKE 'collation%';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement