MySQL无法启动
MySQL启动时提示Timeout error occurred trying to start MySQL Daemon
解决办法:执行/usr/bin/mysql_install_db,修复下就OK了.
MySQL数据表无法使用
启动后发现所有的数据表都无法使用,查看MySQL异常日志,发现如下log
|
InnoDB: Error: cannot allocate 17179885568 bytes of InnoDB: memory with malloc! Total allocated memory InnoDB: by InnoDB 45007312 bytes. Operating system errno: 12 InnoDB: Check if you should increase the swap file or InnoDB: ulimits of your operating system. InnoDB: On FreeBSD check you have compiled the OS with 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 |
原因:这个报错的大意是,内存基本耗尽,没有再可以分配的内存.
解决办法:查看/etc/my.cnf,找innodb_buffer_pool_size,发现设值已经超过了系统总内存,然后重新设置为系统内存1半,即innodb_buffer_pool_size = 6144M 重启MySQL就OK了.
to be continued…