2025年6月6日 星期五 乙巳(蛇)年 三月初十 设为首页 加入收藏
rss
您当前的位置:首页 > 计算机 > 软件应用 > 数据库 > MySQL

mysql查看引擎是innodb还是myisam

时间:03-17来源:作者:点击数:61

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

  • 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文件

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门