最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

关于mysql的Unknowntableengine‘InnoDB’与安装mysqlinnod

来源:懂视网 责编:小采 时间:2020-11-09 08:19:11
文档

关于mysql的Unknowntableengine‘InnoDB’与安装mysqlinnod

关于mysql的UnknowntableengineInnoDB与安装mysqlinnod:在创建测试分页表时,出现warnings,奇怪创建表怎么还出现warnings信息呢 mysql create table test_fenye (uid bigint not null auto_increment, username varchar(30), primary key(uid) ) engine=innodb de
推荐度:
导读关于mysql的UnknowntableengineInnoDB与安装mysqlinnod:在创建测试分页表时,出现warnings,奇怪创建表怎么还出现warnings信息呢 mysql create table test_fenye (uid bigint not null auto_increment, username varchar(30), primary key(uid) ) engine=innodb de

在创建测试分页表时,出现warnings,奇怪创建表怎么还出现warnings信息呢 mysql create table test_fenye (uid bigint not null auto_increment, username varchar(30), primary key(uid) ) engine=innodb default charset=utf8; Query OK, 0 rows affected,

在创建测试分页表时,出现warnings,奇怪创建表怎么还出现warnings信息呢
mysql> create table test_fenye (uid bigint not null auto_increment, username varchar(30), primary key(uid) ) engine=innodb default charset=utf8;
Query OK, 0 rows affected, 2 warnings (0.01 sec)
查看warnings信息
mysql> show warnings;
+———+——+—————————————————-+
| Level | Code | Message |
+———+——+—————————————————-+
| Warning | 1286 | Unknown table engine ‘innodb’ |
| Warning | 1266 | Using storage engine MyISAM for table ‘test_fenye’ |
+———+——+—————————————————-+
2 rows in set (0.00 sec)

奇怪,怎么会Unknown table engine ‘innodb?查询资料,原来MySQL自5.1.*之后,InnoDB就已经不再内置,作为插件来安装了。下面进行InnoDB插件安装与配置

MySQL InnoDB插件安装与配置
如果你安装的时候忘记了添加innodb,又不想重新编辑mysql来添加,这样也没有关系,innodb就是一个插件,安装好mysql后也是可以添加的。

1.先查看MySQL是否安装了innodb插件

mysql> show plugin;
+————+——–+—————-+———+———+
| Name | Status | Type | Library | License |
+————+——–+—————-+———+———+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
+————+——–+—————-+———+———+
2.安装InnoDB插件

mysql> install plugin innodb soname ‘ha_innodb.so’;
如果出现类似错误: ERROR 1126 (HY000): Can’t open shared library ‘/usr/local/mysql/lib/mysql/plugin/ha_innodb.so’ (errno: 13 cannot restore segment prot after reloc: Permission denied)
解决办法: chcon -t texrel_shlib_t /usr/local/mysql/lib/mysql/plugin/ha_innodb.so

3.修改MySQL配置文件/etc/my.cnf
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /usr/local/mysql/var/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/var/
# You can set .._buffer_pool_size up to 50 – 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

4.重启MySQL数据库

如果你想卸载innodb插件,你直接执行
uninstall plugin innodb;


http://www.dbfans.net/%25postname%25.html/

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文档

关于mysql的Unknowntableengine‘InnoDB’与安装mysqlinnod

关于mysql的UnknowntableengineInnoDB与安装mysqlinnod:在创建测试分页表时,出现warnings,奇怪创建表怎么还出现warnings信息呢 mysql create table test_fenye (uid bigint not null auto_increment, username varchar(30), primary key(uid) ) engine=innodb de
推荐度:
标签: sql 关于 mysql
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top