wamp的mysql无法启动。log记录的报错:[Warning] InnoDB: Difficult to find free blocks in the buffer pool.....

这坑爹的遭遇一定要记录一下。

公司的项目查询数据量超大。一个查询请求,竟然把mysql搞挂了。

重启了N次wamp,都是无法启动mysql。然后不耐烦了,备好www目录,重装了wamp。

配置好域名,再次导入数据库,,,然后再次点击那个一个请求。又挂了。。。

无奈找大神问一下,查了/wamp/logs/mysql.log发现竟然4G多的记录。mysql服务也还没有停止。

mysql.log这么大都不敢打开了。再重装了一次wamp。这次先打开了mysql.log文件。再去点那个请求。

报错终于呈现了。

一段一段的相同的报错,在不停的写入。如下所示:

[Warning] InnoDB: Difficult to find free blocks in the buffer pool (21 search iterations)! 21 failed attempts to flush a page! Consider increasing the buffer pool size. It is also possible that in your Unix version fsync is very slow, or completely frozen inside the OS kernel. Then upgrading to a newer version of your operating system may help. Look at the number of fsyncs in diagnostic info below. Pending flushes (fsync) log: 0; buffer pool: 0. 23423 OS file reads, 8265 OS file writes, 33 OS fsyncs. Starting InnoDB Monitor to print further diagnostics to the standard output.

谷歌了一下,原来是innodb的缓冲区设置太小了,需要分配大一点的内存。

打开my.ini找到 innodb_buffer_pool_size,把这个参数设置为1024M,彻底停止mysqld服务。重启wamp。终于可以了。

打开项目,再点击那个请求。也可以了。

报错也消失了。

参考:https://support.plesk.com/hc/en-us/articles/213935665-Unable-to-access-Plesk-psaerror-string-Unable-to-connect-to-database-mysql-connect-

https://blog.csdn.net/wulantian/article/details/16856859

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值