Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

拒绝用户访问 #668

Closed
kitcoun opened this issue Apr 22, 2022 · 2 comments
Closed

拒绝用户访问 #668

kitcoun opened this issue Apr 22, 2022 · 2 comments

Comments

@kitcoun
Copy link

kitcoun commented Apr 22, 2022

问题的描述
django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'172.18.0.4' (using password: YES)")
项目的配置文件
默认配置
如何复现
docker-compose run --rm web python manage.py collectstatic --noinput
相关截图/log

其他信息
Ubuntu 18.04

Client: Docker Engine - Community
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:47:57 2022
OS/Arch: linux/amd64
Context: default
Experimental: true

docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.15rc1
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018

@kitcoun kitcoun added the bug label Apr 22, 2022
@kitcoun
Copy link
Author

kitcoun commented Apr 23, 2022

发现还是docker-compose 版本问题包括前面的mysql权限问题

最好还是使用1.25.5以上版本

其他解决方案
https://blog.csdn.net/qq_41039069/article/details/119322128

修改密码替换成这个
alter user 'root'@'%' identified by '123456';

然后
vim .env
修改
MYSQL_PASSWORD=123456

@whirlwind110
Copy link
Contributor

我tm整错了,测试一晚上,结果发现是.env没导入。。。

This was referenced May 19, 2022
@github-actions github-actions bot added the Stale label Aug 27, 2022
@github-actions github-actions bot closed this as completed Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants