MySQL 5.5客戶端字符集相關引數
character_set_client 在客戶端發出SQL語句所使用的字符集。
collation_connection 連線所使用的字符集校對規則
character_set_results 返回到客戶端的查詢結果集(例如查詢結果或錯誤資訊)所使用的字符集
character_set_connection The character set used for literals that do not have a character set introducer and for number-to-string conversion
--指定客戶端當前會話使用的字符集
SET NAMES會同時更改character_set_client, character_set_connection,character_set_results這三個會話引數的字符集
mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%character%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | gbk |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | /data/share/charsets/ |
+--------------------------+-----------------------+
8 rows in set (0.00 sec)
SET CHARACTER SET會更改character_set_client、character_set_results,同時將character_set_connection設定為character_set_database這個系統引數的值
mysql> set character set latin2;
Query OK, 0 rows affected (0.01 sec)
mysql> show variables like '%character%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| character_set_client | latin2 |
| character_set_connection | gbk |
| character_set_database | gbk |
| character_set_filesystem | binary |
| character_set_results | latin2 |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | /data/share/charsets/ |
+--------------------------+-----------------------+
8 rows in set (0.00 sec)
collation_connection 連線所使用的字符集校對規則
character_set_results 返回到客戶端的查詢結果集(例如查詢結果或錯誤資訊)所使用的字符集
character_set_connection The character set used for literals that do not have a character set introducer and for number-to-string conversion
--指定客戶端當前會話使用的字符集
SET NAMES會同時更改character_set_client, character_set_connection,character_set_results這三個會話引數的字符集
mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%character%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | gbk |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | /data/share/charsets/ |
+--------------------------+-----------------------+
8 rows in set (0.00 sec)
SET CHARACTER SET會更改character_set_client、character_set_results,同時將character_set_connection設定為character_set_database這個系統引數的值
mysql> set character set latin2;
Query OK, 0 rows affected (0.01 sec)
mysql> show variables like '%character%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| character_set_client | latin2 |
| character_set_connection | gbk |
| character_set_database | gbk |
| character_set_filesystem | binary |
| character_set_results | latin2 |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | /data/share/charsets/ |
+--------------------------+-----------------------+
8 rows in set (0.00 sec)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2077708/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rhel4 mysql5.5字符集_客戶端mysql亂碼處理MySql客戶端
- 客戶端字符集客戶端
- MySQL效能相關引數MySql
- MySQL 連線相關引數MySql
- MySQL slow log相關引數MySql
- MySQL環境變數裡關於字符集character_set相關引數的解釋MySql變數
- 設定ORACLE客戶端字符集Oracle客戶端
- 關於客戶端字符集與亂碼的困擾客戶端
- mysql innodb相關引數說明MySql
- Oracle exp 設定客戶端字符集Oracle客戶端
- MySQL slow log相關引數解釋MySql
- mysql relay log相關引數說明MySql
- MySQL 客戶端安裝MySql客戶端
- 以太坊客戶端Geth命令用法-引數詳解客戶端
- 【字符集】“客戶終端字符集”、“NLS_LANG”環境變數以及“資料庫字符集”變數資料庫
- Mysql 字符集引數翻譯MySql
- MySQL handler相關狀態引數解釋MySql
- Mysql 5.5 設定資料庫引數MySql資料庫
- Swoole 協程 MySQL 客戶端與非同步回撥 MySQL 客戶端的對比MySql客戶端非同步
- MySQL索引統計資訊更新相關的引數MySql索引
- mysql二進位制日誌相關引數MySql
- 關於Oracle,作業系統,客戶端字符集的最佳設定(zt)Oracle作業系統客戶端
- PHP獲取客戶端、PHP獲取伺服器相關資訊PHP客戶端伺服器
- mysql、redis 客戶端連線池MySqlRedis客戶端
- 命令列客戶端MySQL如何使用命令列客戶端MySql
- linux安裝mysql客戶端LinuxMySql客戶端
- 技術分享 | 為什麼我的 MySQL 客戶端字符集為 latin1MySql客戶端
- 歸檔相關引數
- PostgreSQL AutoVacuum 相關引數SQL
- MySQL中Redo Log相關的重要引數總結MySql
- 【MYSQL】兩階段提交及相關引數介紹MySql
- MySQL中的統計資訊相關引數介紹MySql
- 第六課 以太坊客戶端Geth命令用法-引數詳解客戶端
- 關於客戶端資訊流思考客戶端
- psycopg2 修改資料庫客戶端字符集資料庫客戶端
- ios 客戶端IPV6網路超時等相關問題iOS客戶端
- MySQL客戶端中文亂碼問題。MySql客戶端
- MySQL 5.5編譯安裝cmake引數說明MySql編譯