• ADADADADAD

    mysql查看修改[ mysql数据库 ]

    mysql数据库 时间:2024-12-25 09:56:27

    作者:文/会员上传

    简介:

    一、查看引擎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;

    mysql查看修改.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysql查看