Change MySQL default character set to UTF-8 in my.cnf?

前端 未结 18 1147
一个人的身影
一个人的身影 2020-11-22 01:55

Currently we are using the following commands in PHP to set the character set to UTF-8 in our application.

Since this is a bit of overhead, we\'d like to set this a

18条回答
  •  独厮守ぢ
    2020-11-22 02:09

    If you're having trouble confirming the client's character-set support using MySQL Workbench, then keep the following note in mind:

    Important All connections opened by MySQL Workbench automatically set the client character set to utf8. Manually changing the client character set, such as using SET NAMES ..., may cause MySQL Workbench to not correctly display the characters. For additional information about client character sets, see Connection Character Sets and Collations.

    Thus I was unable to override MySQL Workbench's character sets with my.cnf changes. e.g. 'set names utf8mb4'

提交回复
热议问题