我想跑:
(venv) ubuntu@ip-172-31-44-136:~/easy_django_repo$ python manage.py makemigrations
并得到这个错误:
/home/ubuntu/venv/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py:143: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "diEvaR6s52EqJv"
connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "diEvaR6s52EqJv"
warnings.warn(
No changes detected
我更改了用户和操作系统的密码:
一个二个一个一个
然后我跑过去:
(venv) ubuntu@ip-172-31-44-136:/etc/postgresql/14/main$ sudo -u postgres psql
Password for user postgres:
(venv) ubuntu@ip-172-31-44-136:/etc/postgresql/14/main$ psql -U postgres
Password for user postgres:
出现错误:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "postgres"
我不知道我该怎么做。有人能给我点建议吗?几乎挣扎了一个星期。
1条答案
按热度按时间efzxgjgh1#
我认为数据库密码应设置在
settings.py
:同时验证EC2示例使用的python版本。默认情况下,它是: