12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-12-25 09:56:27
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
一、查看引擎1、 查看 mysql 引擎1SHOW ENGINES;2、查看表引擎,方法一SHOW TABLE STATUS from 数据库库名 where Name='表名';1SHOW TABLE STATUS from mytest where Name='t
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
一、查看引擎
1、 查看 mysql 引擎
1
SHOW ENGINES;
2、查看表引擎,方法一
SHOW TABLE STATUS from 数据库库名 where Name='表名';
1
SHOW TABLE STATUS from mytest where Name='test';
3、查看表引擎,方法二
mysqlshow -u 数据库登录帐号 -p '数据库登录帐号密码' --status 数据库库名 表名
1
mysqlshow -uroot -p123456 --status mytest test;
二、修改
1、方法一
1
2
alter table tt7 engine=innodb;
alter table tt7 engine=myisam;
2、方法二
1) 创建个和tt7同样表结构的表
1
create table tt7_tmp like tt7;
2) tt7_tmp作为中间结果集
1
insert into tt7_tmp select from tt7;
3) 删除原表的数据
1
truncate table tt7;
4) 这回更改原表的存储引擎
1
alter table tt7 engine=innodb;
5) 再把中间结果集的数据导回原表中
1
insert into tt7 select from tt7_tmp;
6) 删除中间表
1
drop table tt7_tmp;
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19