• 长期去UTF8,并且能够让MAMP安装MySQL,承认我的心脏价值。
MAMP Version 2.0.5 (2.0.5)
MySQL.5.9
my.cnf file:
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
collation_server=utf8_general_ci
character_set_server=utf8
init-connect= SET NAMES utf8
档案的位置:
/Applications/MAMP/Library/Conf/
My:
mysql> show variables where variable_name LIKE %char% OR variable_name LIKE %colla% ;
+--------------------------+--------------------------------------------+
| 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 | /Applications/MAMP/Library/share/charsets/ |
| collation_connection | utf8_general_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+--------------------------+--------------------------------------------+
不同条码之间的转换将同时进行<代码>_database。 价值为utf8,但我似乎只收到_server
。 反映utf8/utf8_unicode_ci的备选办法:
use tsdb;
+--------------------------+--------------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /Applications/MAMP/Library/share/charsets/ |
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | latin1_swedish_ci |
+--------------------------+--------------------------------------------+
Tried
set global character_set_server = utf8;
等等,但它并没有重新启动。
这是我第一次与我这样说的,我相信我会忽略一些基本的东西。 我的死因中是否有人失踪? 还是秩序重要?
感谢。