G
G
gromyko212020-09-28 13:45:10
MySQL
gromyko21, 2020-09-28 13:45:10

Mysql connection error?

I'm trying to host a site and I get an error when connecting to mysql. The mistake itself

File "/opt/myenv/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 36, in
raise ImproperlyConfigured('mysqlclient 1.4.0 or newer is required; you have % s.' % Database.__version__)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you have 0.10.1.

Output pip list:
mysqlclient 2.0.1 Version above 1.4.0.
PyMySQL 0.10.1
According to the version, this place is suitable, I tried to update it in different ways (I also deleted it), like this. But the version does not get higher in PyMySQL. Just in case settings
python3.7 -m pip install --upgrade pymysql
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', 
        'NAME': 'Мое имя',
        'USER': 'Мой юзер',
        'PASSWORD': 'Мой пароль',
        'HOST': 'localhost', 
        'PORT': '3306',
    }
}

I will be glad for any help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-09-28
@gromyko21

Delete PyMySQL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question