mysql启动失败Starting MySQL.The server quit without updating PID file ([失败]ysqllnmp.pid)

来源:互联网 发布:苹果mac官方壁纸 编辑:程序博客网 时间:2024/06/12 20:47

mysql启动失败Starting MySQL.The server quit without updating PID file ([失败]ysqllnmp.pid)
mysql启动时候报Starting MySQL.The server quit without updating PID file ([失败]ysqllnmp.pid
一开始以为没有给/data/mysql的文件夹写入的权限,后来干脆给777的权限,但是启动还是报错,最后查看日志
InnoDB: the log sequence number in the ib_logfiles!
161126 17:30:58 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files…
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer…
161126 17:30:58 InnoDB: Waiting for the background threads to start
161126 17:30:59 InnoDB: 1.1.8 started; log sequence number 1595916
161126 17:30:59 [Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
161126 17:30:59 [Note] - ‘0.0.0.0’ resolves to ‘0.0.0.0’;
161126 17:30:59 [Note] Server socket created on IP: ‘0.0.0.0’.
161126 17:30:59 [ERROR] /usr/local/mysql/bin/mysqld: Can’t create/write to file ‘/usr/local/mysql/data/lnmp.pid’ (Errcode: 13)
161126 17:30:59 [ERROR] Can’t start server: can’t create PID file: Permission denied
161126 17:30:59 mysqld_safe mysqld from pid file /usr/local/mysql/data/lnmp.pid ended
161126 17:38:50 mysqld_safe Starting mysqld daemon with databases from /data/mysql
161126 17:38:50 InnoDB: The InnoDB memory heap is disabled
161126 17:38:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161126 17:38:50 InnoDB: Compressed tables use zlib 1.2.3
161126 17:38:50 InnoDB: Initializing buffer pool, size = 128.0M
161126 17:38:50 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
161126 17:38:50 [ERROR] Plugin ‘InnoDB’ init function returned error.
161126 17:38:50 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
161126 17:38:50 [ERROR] Unknown/unsupported storage engine: InnoDB
161126 17:38:50 [ERROR] Aborting

161126 17:38:50 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

161126 17:38:50 mysqld_safe mysqld from pid file /data/mysql/lnmp.pid ende
并不是说没有写入的权限,,后来讲/data/mysql中的
旧的二进制文件
全部删除,再启动mysql就可以了
重新启动mysql服务,就会重新生成二进制文件

引起这个问题的还有一个是内存不足,需要查看下/etc/my.cnf中的[mysqld]的配置
修改配置文件

原先 设置的log_file的大小是1G,buffer_pool_size 是4G,现在换成小点的,就可以了

0 0
原创粉丝点击