免费PHP万能建站系统_社区团购SaaS_商城系统_软件开发_虚拟币交易所系统_矿机系统_微信钻石投票系统_成品源码

标题: [ MySQL ] 解决办法:3161 - Storage engine MyISAM is disabled (Table crea... [打印本页]

作者: admin    时间: 2024-8-14 11:40
标题: [ MySQL ] 解决办法:3161 - Storage engine MyISAM is disabled (Table crea...
[ MySQL ] 解决办法:3161 - Storage engine MyISAM is disabled (Table creation is disallowed).
问题描述:初始化数据库创建表时出现如下错误:

错误代码:3161
3161 - Storage engine MyISAM is disabled (Table creation is disallowed).
1
2
此错误也经常出现在阿里云RDS数据库与本地数据库数据互相迁移过程中


原因分析:MySQL在8.0以后不在默认支持MyISAM 引擎,默认的支持引擎为:InnoDB,MySQL官方的说明:

In MySQL 8.0, it is normally necessary to use ENGINE to specify the MyISAM storage engine because InnoDB is the default engine.

官方链接:https://dev.mysql.com/doc/refman ... storage-engine.html


解决办法:

1、查看当前数据库版本,确认是否是8.x或以上
--报错SQL语句/incorrect create table sql:
CREATE TABLE t (i INT) ENGINE = MyISAM;
--修正后/new creat table sql(amended):
CREATE TABLE t (i INT) ENGINE = InnoDB;









欢迎光临 免费PHP万能建站系统_社区团购SaaS_商城系统_软件开发_虚拟币交易所系统_矿机系统_微信钻石投票系统_成品源码 (https://ourphp.net/club/) Powered by Discuz! X3.2