I can not change the collate of my column in mysql to utf8_general_ci

0

Good morning, people.

I have a problem with changing the collate of a column in my database. An example of how I'm running:

ALTER TABLE 'minhaTabela' CHANGE COLUMN 'nome' 'nome' VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8_general_ci' AFTER 'id';

Whenever I run, it does not change and leaves the field null. It only allows me to leave it with utf8_unicode format. This is getting me a little nervous and I can not find a solution. The table is MyISAM, it's not like InnoDB .. I do not know if this is related.

Any ideas how to help me?

    
asked by anonymous 16.02.2018 / 16:18

1 answer

1

This example worked for me:

ALTER TABLE 'minhaTabela' CHANGE 'nome' 'nome' VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

NOTE: there is no difference in the query to change the COLLATE between the MyISAM and InnoDb engine

    
17.02.2018 / 11:31