mysql5.6怎么查看引擎_Mysql 5.6运行报错,InnoDB引擎的问题

mysql的错误日志:

2017-09-13 09:13:36 20572 [Note] Plugin ‘FEDERATED’ is disabled.

2017-09-13 09:13:39 20572 [Note] InnoDB: Using atomics to ref count buffer pool pages

2017-09-13 09:13:39 20572 [Note] InnoDB: The InnoDB memory heap is disabled

2017-09-13 09:13:39 20572 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2017-09-13 09:13:39 20572 [Note] InnoDB: Memory barrier is not used

2017-09-13 09:13:39 20572 [Note] InnoDB: Compressed tables use zlib 1.2.3

2017-09-13 09:13:39 20572 [Note] InnoDB: Using Linux native AIO

2017-09-13 09:13:39 20572 [Note] InnoDB: Using CPU crc32 instructions

2017-09-13 09:13:40 20572 [Note] InnoDB: Initializing buffer pool, size = 128.0M

InnoDB: mmap(137363456 bytes) failed; errno 12

2017-09-13 09:13:41 20572 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

2017-09-13 09:13:41 20572 [ERROR] Plugin ‘InnoDB’ init function returned error.

2017-09-13 09:13:41 20572 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.

2017-09-13 09:13:42 20572 [ERROR] Unknown/unsupported storage engine: InnoDB

2017-09-13 09:13:42 20572 [ERROR] Aborting

如果不知道怎么查看错误日志在哪里的,可以使用以下的命令:

service mysqld status

Redirecting to /bin/systemctl status mysqld.service

● mysqld.service – MySQL Community Server

Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)

Active: active (running) since Wed 2017-09-13 09:39:15 CST; 14min ago

Process: 2061 ExecStartPost=/usr/bin/mysql-systemd-start post (code=exited, status=0/SUCCESS)

Main PID: 2060 (mysqld_safe)

CGroup: /system.slice/mysqld.service

├─2060 /bin/sh /usr/bin/mysqld_safe –basedir=/usr

└─2357 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/usr/lib64/mysql/plugin –log-error=/var/log…

Sep 13 09:39:08 izj6chpn3pk7tamab9z05iz systemd[1]: Starting MySQL Community Server…

Sep 13 09:39:13 izj6chpn3pk7tamab9z05iz mysqld_safe[2060]: 170913 09:39:13 mysqld_safe Logging to ‘/var/log/mysqld.log’.

Sep 13 09:39:13 izj6chpn3pk7tamab9z05iz mysqld_safe[2060]: 170913 09:39:13 mysqld_safe Starting mysqld daemon with databases fr…mysql

Sep 13 09:39:15 izj6chpn3pk7tamab9z05iz systemd[1]: Started MySQL Community Server.

Hint: Some lines were ellipsized, use -l to show in full.

上面的红色就是日志的地址,以后报错mysql或者mysql启动不了,都可以在这里面查看。

那么出现上文我的这个错误怎么解决了?

第一步:处理innoDB的问题

If you’re using MySQL 5.6+ and want to disable InnoDB, don’t forget “–default-tmp-storage” or it won’t work:To disable InnoDB, use –innodb=OFF or –skip-innodb. In this case, because the default storage engine is InnoDB, the server will not start unless you also use –default-storage-engine and –default-tmp-storage-engine to set the default to some other engine for both permanent and TEMPORARY tables.

You can add this to your my.cnf:

[mysqld]特别注意这个,加到my.cnf中的时候,一定要加在这个的下面

innodb=OFF

ignore-builtin-innodb

skip-innodb

default-storage-engine=myisam

default-tmp-storage-engine=myisam

第二部分,来处理缓存的问题

innodb_buffer_pool_size = 60M 应该在 [mysqld] 这个 section 下。加在my.cnf里面即可。

上面的解决办法其实核心就是使用my.cnf的配置问题,导致mysql的启动问题。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值