一、错误
错误一:正常使用Mysql时,连接突然报错:
2003-can't connect to mysql server on ''(10061)
错误二:看了网上各种方法,决定试试最简单的重启,出现错误:
Starting MySQL.The server quit without updating PID file (/[FAILED]mysql/izuf634p00rctpi3m55om5z.pid).
错误三:查看mysql错误日志,出现:
InnoDB: Cannot allocate memory for the buffer pool
二、解决措施
分析:1.查看mysql错误日志,2.分析是阿里云最低配的服务器内存分配不够,3.在my.cnf重新设置innodb_buffer_pool_size大小
innodb_buffer_pool_size=100M
4.运行:/etc/init.d/mysql start
5.出现下面即成功了

本文介绍了在使用Mysql过程中遇到的连接错误及内存分配不足问题,并提供了详细的解决步骤,包括重启服务、调整innodb_buffer_pool_size参数等。
888

被折叠的 条评论
为什么被折叠?



