mysql查看引擎是innodb还是myisam

查看默认引擎,新建表的时候默认就会用这种引擎:

show engines; 
show variables like '%engine%'; 

对于之前创建的表,引擎可能和默认的不一样。
如何查看:

SHOW TABLE STATUS FROM `db_data_jpa_create`;   -- 查看某数据库所有表引擎
show table status where name ='level' ; -- level是表名
show create table 'level';  -- level是表名

select table_schema,table_name,engine from information_schema.tables where table_name like 'level'; 

修改表的engine(但是貌似无用啊):

alter table level engine='myisam'; -- 前提是没有存在外键关系,注意没有set 

修改数据库默认引擎:
win7是my.ini文件 , linux是my.cnf文件

你可能感兴趣的:(mysql)