mysql5.7 solo web服务器

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: 前言生活生活奈若何???直接上干货!报错如图所示:InnoDB: To fix the problem and start mysqld:InnoDB: 1) If there is a permission problem in the file and mysqld...

前言

生活生活奈若何???


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


115708b9adec0281361505def74622e5.png-wh_


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选项下*/


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_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的配置有问题!


9a2713c3cea246b0fd2e22bcd799213d.png-wh_


重新启动!

74ad3364835b6ec7499abac2dc4c1e36.png-wh_


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

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
1月前
|
存储 资源调度 应用服务中间件
浅谈本地开发好的 Web 应用部署到 ABAP 应用服务器上的几种方式
浅谈本地开发好的 Web 应用部署到 ABAP 应用服务器上的几种方式
27 0
|
2月前
计算机网络:思科实验【1-访问WEB服务器】
计算机网络:思科实验【1-访问WEB服务器】
计算机网络:思科实验【1-访问WEB服务器】
|
1月前
|
网络协议 Shell 网络安全
实验目的1.编译安装httpd2.优化路径3.并将鲜花网站上传到web服务器为网页目录4.在客户机访问网站http://www.bdqn.com
实验目的1.编译安装httpd2.优化路径3.并将鲜花网站上传到web服务器为网页目录4.在客户机访问网站http://www.bdqn.com
164 0
|
1月前
|
前端开发 应用服务中间件 nginx
使用Docker快速搭建Web服务器Nginx
本文指导如何使用Docker快速搭建Nginx服务器。首先,通过`docker pull`命令获取Nginx镜像,然后以容器形式运行Nginx并映射端口。通过挂载目录实现本地文件与容器共享,便于自定义网页。使用`docker ps`检查运行状态,访问IP:8088确认部署成功。最后,介绍了停止、删除Nginx容器的命令,强调Docker简化了服务器部署和管理。
50 0
|
1月前
|
Java 关系型数据库 MySQL
Flink1.18.1和CDC2.4.1 本地没问题 提交任务到服务器 报错java.lang.NoClassDefFoundError: Could not initialize class io.debezium.connector.mysql.MySqlConnectorConfig
【2月更文挑战第33天】Flink1.18.1和CDC2.4.1 本地没问题 提交任务到服务器 报错java.lang.NoClassDefFoundError: Could not initialize class io.debezium.connector.mysql.MySqlConnectorConfig
52 2
|
1月前
|
Windows
Windows Server 各版本搭建 Web 服务器实现访问本地 Web 网站(03~19)
Windows Server 各版本搭建 Web 服务器实现访问本地 Web 网站(03~19)
57 2
|
1月前
|
机器学习/深度学习 Python
Python基础:构建一个简单的Web服务器
Python基础:构建一个简单的Web服务器
57 1
|
1月前
|
应用服务中间件 Apache nginx
web后端-web服务器对比
web后端-web服务器对比
|
1月前
|
关系型数据库 MySQL 数据库
MySQL服务器端安装教程
MySQL服务器端安装教程
35 0
|
1月前
|
Unix 应用服务中间件 Apache
常用Web服务器
常用Web服务器。
35 1