mysql5.7 solo web服務器

前言mysql

生活生活奈若何???nginx


直接上乾貨!報錯如圖所示:sql


115708b9adec0281361505def74622e5.png-wh_


InnoDB: To fix the problem and start mysqld:ide

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

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

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 normalorm

InnoDB: crash recovery and ignore that table.server

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

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選項下*/


e4256665e4cab368263b7b6ee95ed50c.png-wh_


重啓msyql systemctl restart mysqld 


124511e863b5a93e5664c986900aecd1.png-wh_


登陸成功!

ffd4df31ed6aa0e16bdd7868391b374b.png-wh_



nginx報錯以下:

f75a0b1d5cc4c86641e75b067fe65331.png-wh_


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_p_w_picpath_filter_module.so" version 1010002 instead of 1012001 in /usr/share/nginx/modules/mod-http-p_w_picpath-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的配置有問題!


9a2713c3cea246b0fd2e22bcd799213d.png-wh_


從新啓動!

74ad3364835b6ec7499abac2dc4c1e36.png-wh_


總結!習慣無論什麼錯誤都想寫在博客上!!!

相關文章
相關標籤/搜索