MySQL Daemon failed to start
After installing MySQL 5.6, the daemon mysqld seemed not started.
[root@test ~]# service mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
Let's check the log of mysqld.
[root@test ~]# tail -f /var/log/mysqld.log
...
140325 03:29:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
...
InnoDB: mmap(137363456 bytes) failed; errno 12
2014-03-25 03:29:09 4649 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2014-03-25 03:29:09 4649 [ERROR] Plugin 'InnoDB' init function returned error.
2014-03-25 03:29:09 4649 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-03-25 03:29:09 4649 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-03-25 03:29:09 4649 [ERROR] Aborting
...
It seemed that mysqld_safe cannot allocate memory for InnoDB. I think it may be caused by low physical memory in this server. So our goal is to reduce the resident memory of mysqld.
PERFORMANCE_SCHEMA
We can reduce the amount of memory allocation by turning off performance_schema of MySQL. That is, adding performance_schema=off under the group [mysqld] in /etc/my.cnf.
[root@test ~]# vi /etc/my.cnf
...
[mysqld]
...
#For low memory
performance_schema=off
...
[mysqld_safe]
...
Let's try to start mysqld again.
[root@test ~]# service mysqld start
Starting mysqld: [ OK ]
It's working now. No more "MySQL Daemon failed to start."