Last active
April 19, 2020 16:24
-
-
Save mildcore/421d69d36fb76c1a5d66a77c9389c686 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..\MySQL\MySQL Server 5.7\DATA\my.ini | |
------------这两个可以省略------------------------- | |
[client] | |
default-character-set=utf8mb4 | |
[mysql] | |
default-character-set=utf8mb4 | |
-----------just use this---------------------------- | |
# system-time-zone could be set in OS ENVIRON [TZ=CST-8:00], if mysql failed to get from os by default. | |
# default-time-zone could be removed [SYSTEM by default] if system-time-zone is rightly getted by mysql. | |
[mysqld] | |
log_timestamps=SYSTEM | |
default-time-zone='+8:00' | |
character-set-server=utf8mb4 | |
collation-server=utf8mb4_unicode_ci | |
skip-character-set-client-handshake | |
---------- | |
测试: | |
SHOW VARIABLES LIKE 'char%'; SHOW VARIABLES LIKE 'coll%'; SHOW VARIABLES LIKE '%timestamps'; SHOW VARIABLES LIKE '%time_zone'; | |
更多内容可参考: | |
https://stackoverflow.com/a/24487309 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment