mysql system variable table_type doesn't work

2019-02-18 03:30发布

问题:

I am unable to set the system variable table_type. When I try to do so I get the following error.

mysql> SET table_type=InnoDB;
ERROR 1193 (HY000): Unknown system variable 'table_type'

I see that "table_type" is not listed when I do a "SHOW VARIABLES". Is this a setup issue?

To install mysql I just did a "sudo yum install mysql mysql-server mysql-libs" on Amazon EC2 instance.

回答1:

From the documentation:

This variable was removed in MySQL 5.5.3. Use storage_engine instead.

Which in turn says:

This variable is deprecated as of MySQL 5.5.3. Use default_storage_engine instead.

Therefore you should use SET default_storage_engine=InnoDB, which FWIW is the default since MySQL 5.5.5.



回答2:

pls try this one

ALTER TABLE t1 ENGINE = InnoDB;