2014-07-14 28 views
1

我正在使用CentOs。我安裝的mysqld使用yum install mysql mysql-server但是,現在我想知道我使用如何找出我在Linux,MyISAM和InnoDB中使用哪種類型的mysql?

我都試過service mysqld statusmysql -u root -p pass他們,不顯示此信息,即「MyISAM和InnoDB」,這類型的MySQL。有沒有辦法找出答案?

+0

目前尚不清楚你在找什麼。 MyISAM和InnoDB是創建表時可以選擇的引擎。你想知道默認是什麼嗎? – Barmar

+0

順便說一句,在'/ etc/mysql /'下查看MySQL –

回答

2

開始mysql做:

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

這顯示了存儲引擎,你有可用,這是默認。

+0

的配置謝謝。我說'InnoDB DEFAULT'因此,我認爲我使用的是InnoDB? –

+0

您默認使用它。當你創建一個表時,你可以使用'engine = myisam'來爲該表使用MyISAM。 – Barmar

+0

哦,另一個很酷的信息。謝謝 –

1

您可以使用SHOW ENGINES獲得支持的存儲引擎。

如果你想知道哪些表使用該存儲引擎,你可以使用SHOW TABLES

相關問題