Confluence亂碼解決

IT學為發表於2019-06-11

初次使用Confluence時,發現中文有問號,解決辦法:

1.在mysql中輸入以下命令:

mysql> show variables like 'char%';

|Variable_name           | Value

+--------------------------+----------------

|character_set_client     | gbk

|character_set_connection | gbk

|character_set_database   | latin1

|character_set_filesystem | binary

|character_set_results    | gbk

|character_set_server     | latin1

|character_set_system     | utf8

|character_sets_dir       | C:/Program File

+--------------------------+----------------

8 rows in set (0.00 sec) 

2.要latin1換成UTF-8的編碼,就可以了,修改mysql的配置檔案my.cnf,在/etc/my.cnf,加上下面三行

[root@localhost /]#vi /etc/my.cnf 

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

# Disablingsymbolic-links is recommended to prevent assorted security risks

symbolic-links=0

collation_server=utf8_unicode_ci

character_set_server=utf8

skip-character-set-client-handshake

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

3.重啟mysql中文顯示正常了

systemctl restart mysqld

 

 

 

 

相關文章