在 MySQL my.cnf 中设置 character_set_results latin1

在 MySQL my.cnf 中设置 character_set_results latin1

这些是 MySQL 5.5.62 版本上的默认字符和排序规则设置:

  mysql> show variables like "%character%";show variables like 
  "%collation%";
   +--------------------------+----------------------------+
   | Variable_name            | Value                      |
   +--------------------------+----------------------------+
   | character_set_client     | utf8                       |
   | character_set_connection | utf8                       |
   | character_set_database   | latin1                     |
   | character_set_filesystem | binary                     |
   | character_set_results    | utf8                       |
   | character_set_server     | latin1                     |
   | character_set_system     | utf8                       |
   | character_sets_dir       | /usr/share/mysql/charsets/ |
   +--------------------------+----------------------------+


   +----------------------+-------------------+
   | Variable_name        | Value             |
   +----------------------+-------------------+
   | collation_connection | utf8_general_ci   |
   | collation_database   | latin1_swedish_ci |
   | collation_server     | latin1_swedish_ci |
   +----------------------+-------------------+

我想将以下参数永久更改为 latin1:

   character_set_client=latin1
   character_set_connection=latin1
   character_set_results=latin1
   collation_connection=latin1

我已经尝试使用这些值调整 my.cnf,但没有成功,但在重新启动 mysql 时,守护进程甚至没有启动。有什么想法吗?

答案1

collation_connection=latin1

latin1不是排序规则。 latin1_swedish_ci是。

相关内容