用nginx刚开始网页显示的挺好,就一刷新,别的什么也没动,就报了这个错
来源:17-8 uwsgi和nginx配置
慕侠3297407
2021-11-15
OperationalError at /
(1045, “Access denied for user ‘root’@‘localhost’ (using password: YES)”)
Request Method: GET
Request URL: http://121.41.79.189/
Django Version: 2.2
Exception Type: OperationalError
Exception Value:
(1045, “Access denied for user ‘root’@‘localhost’ (using password: YES)”)
Exception Location: /root/.virtualenvs/mxonline/lib/python3.7/site-packages/MySQLdb/connections.py in init, line 185
Python Executable: /root/.virtualenvs/mxonline/bin/uwsgi
Python Version: 3.7.3
Python Path:
[’.’,
’’,
’/usr/local/lib/python37.zip’,
’/usr/local/lib/python3.7’,
’/usr/local/lib/python3.7/lib-dynload’,
’/root/.virtualenvs/mxonline/lib/python3.7/site-packages’]
Server time: 星期一, 15 十一月 2021 02:21:51 +0800
Error during template rendering
In template /root/ashangwebs/templates/index.html, error at line 32
1045
1回答
-
慕侠3297407
提问者
2021-11-15
已解决,settings里面的数据库设置的最后一条host:127.0.0.1改成了阿里云的公网ip好了。。。老师我看你视频上的为什么是127.0.0.1?
012021-11-16
相似问题