Я установил mysqlclient, но не могу запустить сервер.
Я новичок в python и Django. Я хотел бы подключить мой Django проект к базе данных MySQL, я установил mysqlclient
brew install mysql
pipenv install mysqlclient
но после изменения настроек на:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'storefront',
'HOST': 'localhost',
'USER': 'root',
'PASSWORD': 'my_password',
}
}
Я получаю ошибку при запуске сервера: (NameError: имя '_mysql' не определено)
Я уже проверил статус MySQL, и он установлен правильно:
mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.29 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Также я добавил каталог MySQL в PATH
echo $PATH
export PATH=$PATH:/opt/homebrew/opt/mysql
В чем проблема?