美文网首页
mysql之搜索引擎

mysql之搜索引擎

作者: 猿二胖 | 来源:发表于2020-04-15 13:35 被阅读0次

1、查看当前数据库默认引擎

$show variables like ‘default_storage_engine’

2、查询各表引擎

$show table status from dbname;
$show create table tbname

3、查询当前数据库所支持到引擎

$show engins

4、查询哪些存储引擎支持事物处理

$select engine from information_chema.engines where transactions = ‘yes’; 

5、修改数据库引擎

  • 方式1:修改配置文件my.ini
将my-small.ini另存为my.ini,在[mysqld]后面添加default-storage-engine=InnoDB,重启服务,数据库默认的引擎修改为InnoDB
  • 方式2:建表时指定
$create table mytbl( id int primary key, name varchar(50) )type=MyISAM;
  • 方式3:建表后更改
$alter table mytbl2 type = InnoDB;

相关文章

网友评论

      本文标题:mysql之搜索引擎

      本文链接:https://www.haomeiwen.com/subject/nbqcvhtx.html