I have a table, students, with 3 columns: id, name, and age.
I have a UNIQUE index Index_2 on
I found that
ALTER TABLE students CHARACTER SET utf8 COLLATE utf8_bin;
did not work for me, as it didn't change the collation of existing columns, as can be seen in the results of this query:
SHOW FULL COLUMNS from students;
However, the following query did the job and converted existing columns to utf8_bin collation:
ALTER TABLE students CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
(notice the "CONVERT TO")