[quote]
100920 10:50:21 mysqld_safe Starting mysqld daemon with databases from /byread/data
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: mmap(11010048000 bytes) failed; errno 12
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
100920 10:50:21 [ERROR] Plugin 'InnoDB' init function returned error.
100920 10:50:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
100920 10:50:21 [Warning] 'user' entry 'root@test3' ignored in --skip-name-resolve mode.
100920 10:50:21 [Warning] 'user' entry '@test3' ignored in --skip-name-resolve mode.
100920 10:50:21 [Note] Event Scheduler: Loaded 0 events
100920 10:50:21 [Note] /byread/bin/mysql/libexec/mysqld: ready for connections.
Version: '5.1.45-log' socket: '/byread/bin/mysql/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
100920 10:50:50 [Note] /byread/bin/mysql/libexec/mysqld: Normal shutdown
100920 10:50:50 [Note] Event Scheduler: Purging the queue. 0 events
100920 10:50:52 [Note] /byread/bin/mysql/libexec/mysqld: Shutdown complete
100920 10:50:52 mysqld_safe mysqld from pid file /byread/data/cas.pid ended
[/quote]
出现这种情况,因为大意没有察看日志,所以当建表的时候,mysql会使用存储引擎MyISAM来建表,而不进行提示。
一开始出现问题小郁闷了一下,执行以下命令发现没有InnoDB时才发现问题。
[quote]
mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)
[/quote]
100920 10:50:21 mysqld_safe Starting mysqld daemon with databases from /byread/data
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: mmap(11010048000 bytes) failed; errno 12
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
100920 10:50:21 [ERROR] Plugin 'InnoDB' init function returned error.
100920 10:50:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
100920 10:50:21 [Warning] 'user' entry 'root@test3' ignored in --skip-name-resolve mode.
100920 10:50:21 [Warning] 'user' entry '@test3' ignored in --skip-name-resolve mode.
100920 10:50:21 [Note] Event Scheduler: Loaded 0 events
100920 10:50:21 [Note] /byread/bin/mysql/libexec/mysqld: ready for connections.
Version: '5.1.45-log' socket: '/byread/bin/mysql/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
100920 10:50:50 [Note] /byread/bin/mysql/libexec/mysqld: Normal shutdown
100920 10:50:50 [Note] Event Scheduler: Purging the queue. 0 events
100920 10:50:52 [Note] /byread/bin/mysql/libexec/mysqld: Shutdown complete
100920 10:50:52 mysqld_safe mysqld from pid file /byread/data/cas.pid ended
[/quote]
出现这种情况,因为大意没有察看日志,所以当建表的时候,mysql会使用存储引擎MyISAM来建表,而不进行提示。
一开始出现问题小郁闷了一下,执行以下命令发现没有InnoDB时才发现问题。
[quote]
mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)
[/quote]
本文记录了一次MySQL启动过程中遇到InnoDB内存分配失败的问题及解决过程。通过日志分析发现InnoDB无法为缓冲池分配内存导致服务启动失败,并介绍了如何检查存储引擎的状态。
1936

被折叠的 条评论
为什么被折叠?



