Loading
0

宝塔mysql:ERROR! MySQL server PID file could not be found pid解决方法

前言:启动mysql提示:ERROR! MySQL server PID file could not be found /www/server/data/xxx.pid报错,该问题遇到过两次了,用户安装的是宝塔面板,磁盘容量足够,其他选项也正常,最终在数据库安装目录/www/server/data/xxxx.err 日志文件查看报下错误,通过日志文件看最重要的信息是/www/server/data/ib_logfile0 is of different size 0 134217728 bytes

网站访问:   SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB'  报错也是这个问题导致,参考如下处理即可,

200715 20:05:44 [Note] Plugin 'FEDERATED' is disabled.
200715 20:05:44 InnoDB: The InnoDB memory heap is disabled
200715 20:05:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200715 20:05:44 InnoDB: Compressed tables use zlib 1.2.11
200715 20:05:44 InnoDB: Using Linux native AIO
200715 20:05:44 InnoDB: Initializing buffer pool, size = 256.0M
200715 20:05:44 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file /www/server/data/ib_logfile0 is of different size 0 134217728 bytes
InnoDB: than specified in the .cnf file 0 67108864 bytes!
200715 20:05:44 [ERROR] Plugin 'InnoDB' init function returned error.
200715 20:05:44 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
200715 20:05:44 [ERROR] Unknown/unsupported storage engine: InnoDB
200715 20:05:44 [ERROR] Aborting

200715 20:05:44 [Note] /www/server/mysql/bin/mysqld: Shutdown complete

通过查找资料,ib_logfile0 及 ib_logfile1 这两个文件是innodb日志文件,报错看可能是日志文件过大导致,
两种处理方法:
1、修改数据库配置文件中的日志文件大小
innodb_log_file_size = 10M
修改后重启mysql再试下,若启动失败,请参考如下方法处理。
2、将这两个文件改名

mv ib_logfile0 ib_logfile0.bak

mv ib_logfile1 ib_logfile1.bak

改名后重启mysql后正常 。
本教程由技术小学生原创,转载请注明出处:https://blog.tag.gg/showinfo-13-35827-0.html





 

声明:站长码字很辛苦啊,转载时请保留本声明及附带文章链接:http://blog.tag.gg/showinfo-13-35827-0.html
上一篇:mysql通过Binlog日志恢复被删除的数据方法
下一篇:mysql innodb损坏修复方法shell批量处理