COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'

前端 未结 4 1802
灰色年华
灰色年华 2020-12-06 09:25

I am trying to fix a character encoding issue - previously we had the collation set for this column utf8_general_ci which caused issues because it is accent insensitive..

4条回答
  •  不思量自难忘°
    2020-12-06 10:03

    Firstly run this query

    SHOW VARIABLES LIKE '%char%';
    

    You have character_set_server='latin1'

    If so,go into your config file,my.cnf and add or uncomment these lines:

    character-set-server = utf8
    collation-server = utf8_unicode_ci
    

    Restart the server. Yes late to the party,just encountered the same issue.

提交回复
热议问题