ubuntu mysql设置问题

时间:2015-07-19 09:03:38

标签: mysql ubuntu

大家好我在我的服务器上安装了apache2和mysql的ubuntu;我不时地收到这条消息:

Warning: mysql_connect(): [2002] Connection refused 
(trying to connect via unix:///var/run/mysqld/mysqld.sock) in /var/www/fanta-trade/wp-includes/wp-db.php on line 1142 
Warning: mysql_connect(): Connection refused in /var/www/fanta-trade/wp-includes/wp-db.php on line 1142`

我不认为是脚本错误,因为如果我重新启动apache它会再次开始工作。我该如何解决?

我还添加了mysql日志:

150719 11:05:52 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
150719 11:05:52 [Note] Plugin 'FEDERATED' is disabled.
150719 11:05:52 InnoDB: The InnoDB memory heap is disabled
150719 11:05:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150719 11:05:52 InnoDB: Compressed tables use zlib 1.2.3.4
150719 11:05:52 InnoDB: Initializing buffer pool, size = 16.0M
InnoDB: mmap(17170432 bytes) failed; errno 12
150719 11:05:52 InnoDB: Completed initialization of buffer pool
150719 11:05:52 InnoDB: Fatal error: cannot allocate memory for the buffer pool
150719 11:05:52 [ERROR] Plugin 'InnoDB' init function returned error.
150719 11:05:52 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150719 11:05:53 [ERROR] Unknown/unsupported storage engine: InnoDB
150719 11:05:53 [ERROR] Aborting

我已经设定了

innodb_buffer_pool_size = 38M

0 个答案:

没有答案