mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB',小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4046字,纯文字阅读大概需要6分钟。
内容图文
![mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'](/upload/InfoBanner/zyjiaocheng/468/1761e85e5237405b95666511614c8df8.jpg)
MySQL > show plugins; +------------+--------+----------------+---------+---------+ | Name | Status | Type | Library | License | +------------+--------+----------------+---------+---------+ | binlog | ACTIVE | STORAGE ENGINE | NULL | GPL | | CSV | ACTIVE | STORAGE ENGINE | NULL | GPL | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL | | MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | +------------+--------+----------------+---------+---------+ 5 rows in set (0.00 sec)
方法一:
在configure的时候加上–with-plugins=innobase (或all) 如果要添多个插件,用半角逗号隔开
方法二:
如果mysql已经编译好了,又不想重新编译,可以安装插件,innodb就是一个插件,安装好mysql后也是可以添加的。
1,查看一下,mysql配置是不是支持动态添加插件
mysql> show variables like "have_%"; +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | have_compress | YES | | have_crypt | YES | | have_csv | YES | | have_dynamic_loading | YES | //在这里是YES表示是支持的
如果是no呢,就不太好办,因为have_dynamic_loading是只读变量,
mysql> set have_dynamic_loading=1; ERROR 1238 (HY000): Variable ‘have_dynamic_loading’ is a read only variable
不过一般情况下都是YES,
2,添加插件
mysql> INSTALL PLUGIN INNODB SONAME ‘ha_innodb.so‘;
//提示打不开文件,没有权限
找到安装目录下的/lib/mysql/plugin目录,运行如下命令:
@ubuntu:/usr/local/mysql # chcon -t texrel_shlib_t /usr/local/mysql/lib/mysql/plugin/ha_innodb.so
其实用ll命令看一下,就可以发现ha_innodb.so是ha_innodb.so.0.0.0的链接,实在不行可以这样执行:
install plugin INNODB soname "ha_innodb.so.0.0.0";
安装以下几个
mysql> install plugin INNODB soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_TRX soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_LOCKS soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_LOCK_WAITS soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_CMP soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_CMP_RESET soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_CMPMEM soname "ha_innodb_plugin.so.0.0.0"; mysql> install plugin INNODB_CMPMEM_RESET soname "ha_innodb_plugin.so.0.0.0";
以上几个命令我看有的达人引用的包是ha_innodb.so,但我执行了会说找不到INNODB_TRX ,我想会不会是这个包里没有,于是改用ha_innodb_plugin.so这个包就可以了。
安装好后,在用 show engines;或者show plugins;来查看
mysql> show plugins; +---------------------+--------+--------------------+---------+---------+ | Name | Status | Type | Library | License | +---------------------+--------+--------------------+---------+---------+ | binlog | ACTIVE | STORAGE ENGINE | NULL | GPL | | CSV | ACTIVE | STORAGE ENGINE | NULL | GPL | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL | | InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL | | INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | +---------------------+--------+--------------------+---------+---------+ 13 rows in set (0.00 sec
mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'
标签:engine mysql error
本文系统来源:http://9272317.blog.51cto.com/9262317/1826343
内容总结
以上是互联网集市为您收集整理的mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'全部内容,希望文章能够帮你解决mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。