Starting MySQL. ERROR! The server quit without updating PID file (/alidata/server/mysql/data/AY140703134622335840Z.pid)
查看日志发现以下日志 请教高手这是什么问题?
140813 08:42:34 mysqld_safe Starting mysqld daemon with databases from /alidata/server/mysql/data
140813 8:42:34 [Note] Plugin 'FEDERATED' is disabled.
140813 8:42:34 InnoDB: The InnoDB memory heap is disabled
140813 8:42:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140813 8:42:34 InnoDB: Compressed tables use zlib 1.2.3
140813 8:42:34 InnoDB: Using Linux native AIO
140813 8:42:34 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140813 8:42:34 InnoDB: Completed initialization of buffer pool
140813 8:42:34 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140813 8:42:34 [ERROR] Plugin 'InnoDB' init function returned error.
140813 8:42:34 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140813 8:42:34 [ERROR] Unknown/unsupported storage engine: InnoDB
140813 8:42:34 [ERROR] Aborting
140813 8:42:34 [Note] /alidata/server/mysql/bin/mysqld: Shutdown complete
140813 08:42:34 mysqld_safe mysqld from pid file /alidata/server/mysql/data/AY140703134622335840Z.pid ended
错误的具体内容是:
121012 11:35:03 [Note] Plugin 'FEDERATED' is disabled.
121012 11:35:03 InnoDB: Error: unable to create temporary file; errno: 2
121012 11:35:03 [ERROR] Plugin 'InnoDB' init function returned error.
121012 11:35:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121012 11:35:03 [ERROR] Unknown/unsupported table type: INNODB
121012 11:35:03 [ERROR] Aborting
我在网上找到解决方案:
1、在MY.INI文件中的 [mysqld] 中增加一行tmpdir="D:/MySQL/data/"修改后,还是启动不了或者能启动但关机后又出现同样问题,接着我做了第二步,重启正常。
2、删除DATA目录下除数据库文件夹外的其他文件,重启mysql,问题解决。
上面办法我按做了但是不行,自己摸索出一个解决办法与上面差不多
第一步:
只要删除MySQL目录下的ib_logfile0和ib_logfile1两个文件
第二步:
找出了无法启动的原因:MySQL在安装的时候不会自动初始tmpdir(临时文件目录),所以要在配置文件my.ini中添加tmpdir路径。
最后在my.ini中添加:
[mysqld]
#自己指定的临时文件目录
tmpdir="E:/Program Files/MySQL/MySQL Server 5.1/Temp/"
如果还是不行的话,我排查了下日志,发现好内存不足。于是我改了php-fpm的如下参数:
pm = static
pm.max_requests = 5000
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 20
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow.log
然后,重启service php-fpm restart,再重店Mysql就可以了!
============ 欢迎各位老板打赏~ ===========
与本文相关的文章
- · docker定时任务Mysql脚本
- · docker安装mysql8注意事项
- · .NET8 Mysql SSL error
- · 定时备份docker中的mysql
- · docker-compose通过容器名连接mysql
- · unity3d mysql error: The given key was not present in the dictionary.
- · MySQL 批量修改数据表编码及字符集
- · Your database must use ‘READ-COMMITTED’ as the default isolation level.
- · MySQL-InnoDB存储引擎
- · 将数据从mysql迁移到clickhouse
- · mysql关于索引那些事儿
- · mysql大数据表加字段改名
Starting MySQL. ERROR! The server quit without updating PID file (/alidata/server/mysql/data/AY140703134622335840Z.pid):目前有1 条留言