分享

[求助] centos7 的数据库报错

路小奇 发表于 2015-12-7 11:15:58 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 8740
报错信息

151207 10:59:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151207 10:59:29 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 13585 ...
151207 10:59:29 InnoDB: The InnoDB memory heap is disabled
151207 10:59:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151207 10:59:29 InnoDB: Compressed tables use zlib 1.2.7
151207 10:59:29 InnoDB: Using Linux native AIO
151207 10:59:29 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
151207 10:59:29 InnoDB: Completed initialization of buffer pool
151207 10:59:29 InnoDB: Fatal error: cannot allocate memory for the buffer pool
151207 10:59:29 [ERROR] Plugin 'InnoDB' init function returned error.
151207 10:59:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151207 10:59:29 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
151207 10:59:29 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
151207 10:59:29 [Note] Plugin 'FEEDBACK' is disabled.
151207 10:59:29 [ERROR] Unknown/unsupported storage engine: innodb
151207 10:59:29 [ERROR] Aborting
151207 10:59:29 [Note] /usr/libexec/mysqld: Shutdown complete
151207 10:59:29 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended  (/var/run/mariadb/mariadb.pid 文件不存在)


已有(2)人评论

跳转到指定楼层
easthome001 发表于 2015-12-7 12:12:07
楼主配置的问题

症状:无法启动mysql,在“mysql数据库目录/主机名.err”日志文件中报错 Unknown/unsupported storage engine: InnoDB
原因:MySQL5.5.8 GA默认引擎为InnoDB,而配置文件(my.cnf)中设置了skip-innodb
解决:在配置文件(my.cnf)中设置default-storage-engine=MyISAM

Error:
2013-08-18 21:08:37 21440 [Note] Plugin 'FEDERATED' is disabled.
2013-08-18 21:08:37 21440 [Note] Plugin 'InnoDB' is disabled.
2013-08-18 21:08:37 21440 [ERROR] Unknown/unsupported storage engine: InnoDB

My.cnf修改成这样就Ok了:
#loose-skip-innodb            
default-storage-engine = MyISAM

加上#号后启动Ok:
mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.13 Source distribution

回复

使用道具 举报

路小奇 发表于 2015-12-7 13:08:40
easthome001 发表于 2015-12-7 12:12
楼主配置的问题

症状:无法启动mysql,在“mysql数据库目录/主机名.err”日志文件中报错 Unknown/unsup ...

额。。。
这样改不对
这是我的配置文件 你在看看吧
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
bind-address = 192.168.1.11
default-storage-engine = innodb
innodb_file_per_table
collation-server=utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条