最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

mysql學(xué)習(xí)筆記之?dāng)?shù)據(jù)引擎

 更新時(shí)間:2017年02月19日 10:34:19   投稿:hebedich  
插件式存儲(chǔ)引擎是MySQL數(shù)據(jù)庫(kù)最重要的特征之一,用戶(hù)可以根據(jù)應(yīng)用的需要尋找如何存儲(chǔ)和索引數(shù)據(jù)、是否使用事務(wù)等。MySQL默認(rèn)支持多種存儲(chǔ)引擎,以適用于不同領(lǐng)域的數(shù)據(jù)庫(kù)應(yīng)用需求,用戶(hù)可以通過(guò)選擇選擇不同的存儲(chǔ)引擎提供應(yīng)用的效率,提供靈活的存儲(chǔ)

查看當(dāng)前數(shù)據(jù)庫(kù)支持的引擎

show engines
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine       | Support | Comment                            | Transactions | XA  | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB       | DEFAULT | Supports transactions, row-level locking, and foreign keys   | YES     | YES | YES    |
| MRG_MYISAM     | YES   | Collection of identical MyISAM tables             | NO      | NO  | NO     |
| MEMORY       | YES   | Hash based, stored in memory, useful for temporary tables   | NO      | NO  | NO     |
| BLACKHOLE     | YES   | /dev/null storage engine (anything you write to it disappears) | NO      | NO  | NO     |
| MyISAM       | YES   | MyISAM storage engine                     | NO      | NO  | NO     |
| CSV        | YES   | CSV storage engine                       | NO      | NO  | NO     |
| ARCHIVE      | YES   | Archive storage engine                     | NO      | NO  | NO     |
| PERFORMANCE_SCHEMA | YES   | Performance Schema                       | NO      | NO  | NO     |
| FEDERATED     | NO   | Federated MySQL storage engine                 | NULL     | NULL | NULL    |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
9 rows in set (0.00 sec)

或者

show engines \G
mysql> show engines \G
*************************** 1. row ***************************
   Engine: InnoDB
   Support: DEFAULT
   Comment: Supports transactions, row-level locking, and foreign keys
Transactions: YES
     XA: YES
 Savepoints: YES
*************************** 2. row ***************************
   Engine: MRG_MYISAM
   Support: YES
   Comment: Collection of identical MyISAM tables
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 3. row ***************************
   Engine: MEMORY
   Support: YES
   Comment: Hash based, stored in memory, useful for temporary tables
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 4. row ***************************
   Engine: BLACKHOLE
   Support: YES
   Comment: /dev/null storage engine (anything you write to it disappears)
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 5. row ***************************
   Engine: MyISAM
   Support: YES
   Comment: MyISAM storage engine
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 6. row ***************************
   Engine: CSV
   Support: YES
   Comment: CSV storage engine
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 7. row ***************************
   Engine: ARCHIVE
   Support: YES
   Comment: Archive storage engine
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 8. row ***************************
   Engine: PERFORMANCE_SCHEMA
   Support: YES
   Comment: Performance Schema
Transactions: NO
     XA: NO
 Savepoints: NO
*************************** 9. row ***************************
   Engine: FEDERATED
   Support: NO
   Comment: Federated MySQL storage engine
Transactions: NULL
     XA: NULL
 Savepoints: NULL
9 rows in set (0.00 sec)

Engine 引擎的名稱(chēng)
Support 是否支付YES表示支持,NO表示不支持
Comment 評(píng)價(jià)或者備注 Defalut表示,默認(rèn)支持的引擎
Transactions 是否支持事務(wù),YES表示支持,NO表示不支持
XA 所有支持的分布式是否符合XA規(guī)范,YES表示支持,NO表示不支持
Savepoints 是否支持事務(wù)處理中的保存點(diǎn),YES表示支持,NO表示不支持

或者

show variables like ‘have%'

mysql> show variables like 'have%';
+------------------------+----------+
| Variable_name     | Value  |
+------------------------+----------+
| have_compress     | YES   |
| have_crypt       | NO    |
| have_dynamic_loading  | YES   |
| have_geometry     | YES   |
| have_openssl      | DISABLED |
| have_profiling     | YES   |
| have_query_cache    | YES   |
| have_rtree_keys    | YES   |
| have_ssl        | DISABLED |
| have_statement_timeout | YES   |
| have_symlink      | YES   |
+------------------------+----------+
11 rows in set, 1 warning (0.00 sec)

Variable_name 引擎名稱(chēng)
value 是否支持YES支持,NO不支持,DISABLED表示支持但未啟用

查看默認(rèn)引擎

show variables like ‘%storage_engine%'

mysql> show variables like '%storage_engine%';
+----------------------------------+--------+
| Variable_name          | Value |
+----------------------------------+--------+
| default_storage_engine      | InnoDB |
| default_tmp_storage_engine    | InnoDB |
| disabled_storage_engines     |    |
| internal_tmp_disk_storage_engine | InnoDB |
+----------------------------------+--------+
4 rows in set, 1 warning (0.00 sec)

InnoDB 為默認(rèn)引擎

修改默認(rèn)引擎

my.ini文件

[mysqld]
# The next three options are mutually exclusive to SERVER_PORT below.
# skip-networking
# enable-named-pipe
# shared-memory
# shared-memory-base-name=MYSQL
# The Pipe the MySQL Server will use
# socket=MYSQL
# The TCP/IP Port the MySQL Server will listen on 默認(rèn)端口號(hào)
port=3306
# Path to installation directory. All paths are usually resolved relative to this. 服務(wù)器的默認(rèn)安裝目錄
# basedir="C:/Program Files/MySQL/MySQL Server 5.7/"
# Path to the database root  數(shù)據(jù)庫(kù)數(shù)據(jù)文件的目錄
datadir=C:/ProgramData/MySQL/MySQL Server 5.7\Data
# The default character set that will be used when a new schema or table is
# created and no character set is defined 修改服務(wù)器默認(rèn)字符
character-set-server=utf8
# The default storage engine that will be used when create new tables when
# 這里修改默認(rèn)引擎
default-storage-engine=INNODB

修改后重啟Mysql服務(wù)

相關(guān)文章

最新評(píng)論

临潭县| 阳春市| 涿鹿县| 海原县| 原阳县| 德安县| 平顺县| 开封县| 娄烦县| 晋江市| 柳州市| 贵德县| 和顺县| 辽阳县| 郯城县| 古丈县| 梧州市| 南城县| 株洲县| 普兰县| 尖扎县| 兖州市| 枣庄市| 荥阳市| 泾阳县| 昭觉县| 龙口市| 三台县| 安溪县| 名山县| 翁源县| 扎囊县| 含山县| 平凉市| 安远县| 浦县| 滕州市| 齐齐哈尔市| 三明市| 湟中县| 嘉兴市|