[英]change default mysql storage engine on Ubuntu
我已經在Ubuntu上安裝了MySQL 5.1.49。 我在/etc/mysql/my.cnf
的末尾添加了以下行
default-storage-engine=innodb
我已經重新啟動mysqld
進程,然后運行
mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| 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 |
| CSV | YES | CSV 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 |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
如您所見,MyISAM仍然是默認值,我缺少什么? 我也跑了
sudo find / -name 'my.cnf'
驗證系統上沒有其他my.cnf
文件
它可能在my.cnf文件的錯誤部分中。
您需要在[mysqld]
部分中設置該變量。 如果將其放在配置文件的末尾,則可能位於不同的部分,因為[mysqld]
通常是第一部分,而不是最后一部分。
驗證是否已將default-storage-engine=innodb
放入適當的[group]
(通常為[mysqld]
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.