Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1720056
  • 博文数量: 362
  • 博客积分: 10587
  • 博客等级: 上将
  • 技术积分: 4098
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-10 18:15
文章分类

全部博文(362)

文章存档

2014年(1)

2013年(58)

2011年(115)

2010年(112)

2009年(76)

分类: Mysql/postgreSQL

2011-05-30 10:52:42

 mysql启动错误日志出现以下错误

# tail -f /opt/mysql/var/localhost.localdomain.err
InnoDB: a big enough maximum process size.
InnoDB: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
100823 11:20:08 [ERROR] Plugin 'InnoDB' init function returned error.

100823 11:20:08 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

100823 11:20:08  InnoDB: Error: cannot allocate 2147500032 bytes of

InnoDB: memory with malloc! Total allocated memory

100823 11:20:08 [Note] Event Scheduler: Loaded 0 events
100823 11:20:08 [Note] /opt/mysql/libexec/mysqld: ready for connections.
Version: '5.1.39-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

登录mysql,无innodb引擎

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         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables | NO           | NO   | NO         |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)

原因:/etc/my.cnf 配置文件里

innodb_buffer_pool_size=2G

由于内存不足,

# free -m

             total       used       free     shared    buffers     cached

Mem:          1010        533        477          0         68        147

-/+ buffers/cache:        317        693

Swap:         1024          0          1024

解决办法:

1、增加swap分区容量 参考 

2、修改innodb_buffer_pool_size值.

重启mysql,使用show engines查看,如下所示:

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)


阅读(15964) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~