Starting MySQL.The server quit without updating PID file

配置wordpress的时候突然提示我连接不上mysql。

首先使用了下面命令查了一下,发现进程中没有了mysql。确认出问题被关闭。

ps -ef | grep mysqld

 

尝试使用下面的命令启动mysql。提示错误:Starting MySQL.The server quit without updating PID file (/[FAILED]server/mysql/data/^).

service mysqld start

 

我擦,这是什么情况,按照错误提示消息去查百度,基本上是各式各样的问题,但是对我提示比较大的一点就是,要看mysql的错误日志文件。

 

打开错误日志文件(使用阿里云的一键安装包,这个log的位置找了半天,基本上是/alidata/server/log/mysql下),发现了很关键的一点(红字加粗部分):

2016-06-07 22:11:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp ser
ver option (see documentation for more details).
2016-06-07 22:11:09 3563 [Note] Plugin 'FEDERATED' is disabled.
2016-06-07 22:11:09 3563 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-06-07 22:11:09 3563 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-07 22:11:09 3563 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-06-07 22:11:09 3563 [Note] InnoDB: Memory barrier is not used
2016-06-07 22:11:09 3563 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-07 22:11:09 3563 [Note] InnoDB: Using Linux native AIO
2016-06-07 22:11:09 3563 [Note] InnoDB: Using CPU crc32 instructions
2016-06-07 22:11:09 3563 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2016-06-07 22:11:09 3563 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2016-06-07 22:11:09 3563 [ERROR] Plugin 'InnoDB' init function returned error.
2016-06-07 22:11:09 3563 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-06-07 22:11:09 3563 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-06-07 22:11:09 3563 [ERROR] Aborting

 

这特么的,给狗一个大饼子,狗都知道内存不够用了。

拿这个关键字在搜搜吧,提示更改my.cnf文件,这个文件在mysql的安装目录下。

 

那个配置文件以前安装后没有更改过,基本上就改成下面就好了

 

------------------------------------原始是这样------------------------------------

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
------------------------------------原始是这样------------------------------------

 

------------------------------------改完是这样------------------------------------

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

innodb_buffer_pool_size = 16M
------------------------------------改完是这样------------------------------------

 

一句话,哥穷,128M的真心没有那么多内存,造成了mysql无法启动。改成这点儿后再启动就可以了。

service mysqld start

 

正常启动,表示如下:

Starting MySQL..                                           [  OK  ]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值