装innodb plugin可动态修改innodb_file_per_table

未安装innodb plugin:

mysql> select version();
+------------+
| version()  |
+------------+
| 5.1.48-log |
+------------+
 
mysql> select @@innodb_version;
ERROR 1193 (HY000): Unknown system variable 'innodb_version'
 
mysql> set global innodb_file_per_table=0;
ERROR 1238 (HY000): Variable 'innodb_file_per_table' is a read only variable

安装innodb plugin:

mysql> select version();
+------------+
| version()  |
+------------+
| 5.1.48-log |
+------------+
 
mysql> select @@innodb_version;
+------------------+
| @@innodb_version |
+------------------+
| 1.0.9            |
+------------------+
 
mysql> show variables like '%innodb_file_per_table%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | ON    |
+-----------------------+-------+
 
mysql> set global innodb_file_per_table=0;
 
mysql> show variables like '%innodb_file_per_table%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | OFF   |
+-----------------------+-------+

2 Responses to “装innodb plugin可动态修改innodb_file_per_table”

  1. fukai说道:

    动态的修改但表的目录变没有变化,不会生成 ibd 文件,还是会接着写 ibdata1

  2. phpcleps说道:

    mysql5.5开始,支持动态修改。

Post a Comment