mysql5.7 数据库重启_nginx mysql数据库5.7 系统重启报错

前言

生活生活奈若何???

直接上干货!报错如图所示:

22050d3e8054ac83a8d393ebcf0a0b3d.png

InnoDB: To fix the problem and start mysqld:

InnoDB: 1) If there is a permission problem in the file and mysqld cannot

InnoDB: open the file, you should modify the permissions.

InnoDB: 2) If the table is not needed, or you can restore it from a backup,

InnoDB: then you can remove the .ibd file, and InnoDB will do a normal

InnoDB: crash recovery and ignore that table.

InnoDB: 3) If the file system or the disk is broken, and you cannot remove

InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf

InnoDB: and force InnoDB to continue crash recovery here.

171104 14:50:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

看看看报错是什么?

解决方法:修改/etc/my.cnf

其实错误日志已经告诉我们该怎么做了:InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf

这句话的意思是让我们增加一条配置 设置此innodb_force_recovery > 0,所以我尝试设置为1,然后重启成功。

# The MySQL server

[mysqld]

innodb_force_recovery = 1  /*增加一行,让其独立运行,注意一定要是在mysqld选项下*/

0f2e56f8197f2adb6cfab9db5649ee5d.png

重启msyql systemctl restart mysqld

a2745aff3f307a4ccbb5684c9639fb6c.png

登录成功!

d2f9f0f3b9c7c87438744a40003d5071.png

nginx报错如下:

e826d2b7425ff96081bd866a21954a0c.png

tail -10 /var/log/nginx/error.log

2017/11/04 14:38:10 [emerg] 12853#12853: module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-geoip.conf:1

2017/11/04 14:42:24 [emerg] 13685#13685: module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-geoip.conf:1

2017/11/04 14:43:11 [emerg] 13837#13837: module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-geoip.conf:1

2017/11/04 14:44:27 [emerg] 14071#14071: module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-image-filter.conf:1

2017/11/04 14:46:12 [emerg] 14400#14400: module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-geoip.conf:1

2017/11/04 14:46:20 [emerg] 14434#14434: module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-geoip.conf:1

2017/11/04 15:03:28 [emerg] 18276#18276: "rewrite" directive is not allowed here in /etc/nginx/conf.d/newdefine.conf:1

2017/11/04 15:24:33 [emerg] 21283#21283: "rewrite" directive is not allowed here in /etc/nginx/conf.d/newdefine.conf:1

2017/11/04 15:34:29 [emerg] 21390#21390: "rewrite" directive is not allowed here in /etc/nginx/conf.d/newdefine.conf:1

2017/11/04 15:36:29 [emerg] 21416#21416: unknown directive "geoip_country" in /etc/nginx/conf.d/geoip.conf:1

通过日志分析发现conf的配置有问题!

77c8a5c9c4a03ac31b0e64f88f8d50f8.png

重新启动!

c6ef8d5b74d7496bbf6da1588502c79e.png

总结!习惯不管什么错误都想写在博客上!!!

本文出自 “李世龙” 博客,谢绝转载!

原文:http://lwm666.blog.51cto.com/11811339/1978974

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值