character_set_database的意義
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like '%char%'
-> ;
+--------------------------+----------------------------------+
| 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/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> show create database test;
+----------+---------------------------------------------------------------+
| Database | Create Database |
+----------+---------------------------------------------------------------+
| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+---------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> 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/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.00 sec)
mysql> create database la default character set latin1;
Query OK, 1 row affected (0.00 sec)
mysql> use la;
Database changed
mysql> show variables like '%character%';
+--------------------------+----------------------------------+
| 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 | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.00 sec)
mysql> create database gbkk default character set gbk;
Query OK, 1 row affected (0.01 sec)
mysql> use gbkk
Database changed
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 | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.00 sec)
character_set_database
預設的會是所在資料庫的字符集,如果沒有使用use進入任何庫,那麼這個引數的值和 character_set_server一樣。
轉載請註明源出處
QQ 273002188 歡迎一起學習
QQ 群 236941212
oracle,mysql,mongo 相互交流
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25099483/viewspace-1983336/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- synchronized的意義synchronized
- 人生的意義
- nginx的配置檔案server_name的意義 location意義NginxServer
- code review的意義View
- PVP模式存在的意義模式
- 學習Lua的意義
- 特徵向量的物理意義特徵
- 前端框架存在的意義前端框架
- 前端MV*框架的意義前端框架
- 垃圾收集分析的意義
- vue中“:”、“.”、“@”意義Vue
- 維修app開發的意義APP
- python編碼的意義Python
- Oracle中checkpoint存在的意義Oracle
- 加密鹽的意義和用途加密
- linux版本號的意義Linux
- 熵的社會學意義熵
- KMP, Manacher, SA 存在的意義KMP
- 創業前思考“做有意義的事”的意義創業
- 實踐和思考的重要意義
- 主動網路安全的意義
- Suspense對React的意義在哪裡?React
- Vitalik Buterin:去中心化的意義中心化
- AndroidC元件的經濟意義Android元件
- SD卡速度等級的意義SD卡
- ASMLib存在的現實意義ASM
- nproc/nfile之於oracle的意義Oracle
- linux 下各errno的意義Linux
- FTP 數字程式碼的意義FTP
- 虛擬繼承的意義 (轉)繼承
- Oracle中Number(p,s)的意義Oracle
- java中介面的意義Java
- oracle核心引數意義Oracle
- 核心引數意義(轉)
- 軟體測試的目的和意義
- IP地址標識的幾種意義
- 論python描述符的意義Python
- IT運維視覺化存在的意義運維視覺化