Comments (21)
你好, 网站出现了Internal Server Error,博客都无法展示 ,但是一般页面可以展示,但是博客内容以及其他的内容无法展示。这一般啥问题
一般是代码运行出错了,具体原因要看后台日志。
from blogin.
我看了/log文件都是
blogin.log blogin.log.1 blogin.log.2 blogin.log.3 task.log task.log.1 task.log.10 task.log.2 task.log.3 task.log.4 task.log.5 task.log.6 task.log.7 task.log.8 task.log.9
看哪一个呢很多都是
021-12-09 07:19:27,953 INFO 更新github仓库信息成功!
2021-12-09 07:20:23,530 INFO 异常流量检测成功,检测时刻:2021-12-09 07:20:23.530563,检测时间段:['2021:07:19', '2021:07:20'],检测详情:{}
2021-12-09 07:21:23,530 INFO 异常流量检测成功,检测时刻:2021-12-09 07:21:23.530311,检测时间段:['2021:07:20', '2021:07:21'],检测详情:{}
2021-12-09 07:22:23,530 INFO 异常流量检测成功,检测时刻:2021-12-09 07:22:23.530377,检测时间段:['2021:07:21', '2021:07:22'],检测详情:{'45.155.205.233': 1}
2021-12-09 07:23:23,530 INFO 异常流量检测成功,检测时刻:2021-12-09 07:23:23.530380,检测时间段:['2021:07:22', '2021:07:23'],检测详情:{
from blogin.
不知道你是怎么部署的,先看一下blogin.log
from blogin.
blogin.log.3
File "/home/ubuntu/.local/lib/python3.6/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1698, "Access denied for user 'root'@'localhost'")
The above exception was the direct cause of the following exception:
from blogin.
数据库连接错误,你在.env
文件配置的数据库连接有问题。
from blogin.
我前面没问题啊 我最近也一直没改啊 难道密码被人改了
from blogin.
是不是访问数据库看看 是否能正常登录
from blogin.
你自己终端登录MySQL试一下看
from blogin.
确实 密码忘了 不是我设置的密码,这可咋弄,需要重新设置把。
from blogin.
你能登录MySQL吗?
from blogin.
你能登录MySQL吗?
无法登录,密码不是我设置default
from blogin.
我重新设置看看
from blogin.
解决了吗?我关闭issue了
from blogin.
@weijiang1994 没解决 为啥我sudo mysql -u root可以进去,然后改了root密码。但是为啥 mysql -u root -p输入密码不行啊
from blogin.
@weijiang1994 没解决 为啥我sudo mysql -u root可以进去,然后改了root密码。但是为啥 mysql -u root -p输入密码不行啊
那你重新创建一个MySQL用户就行了 参考我这篇文章https://2dogz.cn/blog/article/30/
from blogin.
@weijiang1994 我重新新建了一个用户,然后在.env修改啦。咋还是network error错误啊。需要重新启动程序吧
from blogin.
重启一下程序
from blogin.
谢谢 OK啦。很多都忘了 看来我需要记录下来的一些处理错误。 我最近会重新对网站进行改造,到时候还要向你请教。
from blogin.
@tianke0711 建议定时备份数据库数据,防止数据丢失~
from blogin.
@weijiang1994 谢谢建议 怎么备份数据库数据啊, 你可有博客介绍啊
from blogin.
先创建一个shell脚本,把下面{}里的内容替换成自己实际的信息
#!/bin/bash
date_str=$(date "+%Y-%m-%d")
echo $date_str
cd {你想存放的路径}
mysqldump -h 127.0.0.1 -u {数据库用户} --password={数据库密码} -R -E -e \{数据库名称}> {你想存放的路径}/$date_str.sql
tar -Jcvf $date_str.tar.xz $date_str.sql
rm $date_str.sql
然后通过crontab设置定时任务,具体设置方法自行百度。
from blogin.
Related Issues (20)
- 数据库死锁 HOT 3
- UnboundLocalError: local variable 'results' referenced before assignment HOT 2
- 我打算开发一个活动栏目。 HOT 2
- 请问如何部署到服务器? HOT 3
- 其它操作系统 HOT 20
- jinja2.exceptions.TemplateNotFound: main/index.html HOT 16
- 博客继续阅读 按钮 HOT 4
- 部署到AWS ec2 ubuntu 上出现了问题
- blueprint/front/blog.py", line 404, in load_one return jsonify({'one': one.content}) AttributeError: 'NoneType' object has no attribute 'content'
- 相应文件缺失? HOT 1
- 请问怎么解决configparser.NoSectionError: No section: 'baidu' HOT 2
- 大佬,请问这是什么原因啊 HOT 8
- 个人博客云端部署问题 HOT 2
- AttributeError: 'Babel' object has no attribute 'localeselector' HOT 6
- 进首页显示404 HOT 13
- 请问FileNotFoundError: [Errno 2] No such file or directory: 'E:\\_Study_Record\\git_files\\m_blog/history/e29c91a7c65dfdd2b5bff4294f4a5138.txt'怎么解决啊 HOT 2
- 博客地址无法访问了 HOT 6
- 后台 博客编辑栏 操作按钮无法点击 HOT 10
- avatar文件路径的问题 HOT 1
- 初始化数据库命令失败 HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blogin.