linux上mysql編碼 utf-8設定
vi /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
character-set-server=utf8
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql]
default-character-set=utf8
[client]
default-character-set=utf8
SHOW VARIABLES LIKE ‘character%’;
+————————–+—————————-+
| 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 | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+————————–+—————————-+
相關文章
- Windows CMD永久設定UTF-8編碼Windows
- 設定Tomcat的UTF-8編碼Tomcat
- 設定myeclipse的預設編碼為utf-8Eclipse
- JPA設定MySQL編碼MySql
- MySQL字元編碼設定方法MySql字元
- Windows下CMD和Tomcat設定編碼為UTF-8WindowsTomcat
- Java專案亂碼及設定Tomcat的UTF-8編碼JavaTomcat
- mysql5.7.22設定中文編碼-解決亂碼問題LinuxMySqlLinux
- Linux下修改MySQL資料庫字元編碼為UTF-8解決中文亂碼LinuxMySql資料庫字元
- MySQL設定utf8mb4編碼MySql
- Centos-Mysql建立資料庫-編碼設定CentOSMySql資料庫
- 設定編譯比特幣原始碼-linux編譯比特幣原始碼Linux
- Linux設定語言編碼(字符集)Linux
- Mysql設定字元編碼及varchar寬度問題MySql字元
- springboot設定UTF-8Spring Boot
- 編碼設定應注意
- Tomcat 設定編碼Tomcat
- PHP中的字串、編碼、UTF-8PHP字串
- Mysql編碼, Mysql編碼流程, Mysql編碼順序, Mysql編碼原理, Mysql編碼修改依據MySql
- linux vmware上網設定Linux
- java編譯、編碼、語言設定Java編譯
- mysql如何設定密碼MySql密碼
- 請問怎麼將rose的字元編碼設為utf-8ROS字元
- JS 簡單實現UTF-8編碼,Base64編碼JS
- UTF-8編碼與GBK編碼之間的轉換
- MyEclipse設定文字編碼Eclipse
- Ubuntu 下設定中文編碼Ubuntu
- spring字元編碼設定Spring字元
- MyEclipse設定編碼方式Eclipse
- PHP中文GBK編碼轉UTF-8PHP
- 字元編碼:ASCII,Unicode和UTF-8字元ASCIIUnicode
- Linux下安裝MySQL後root密碼的設定LinuxMySql密碼
- linux上java路徑設定LinuxJava
- php 設定字符集為utf-8PHP
- docker 容器指定utf-8編碼,解決中文亂碼Docker
- JSP中的編碼設定JS
- 字元編碼:Unicode & UTF-16 & UTF-8字元Unicode
- 解決NSData中包含非法UTF-8編碼