user9779509
user9779509

Reputation:

Django MySQL connection Error on windows Server

I have tried using pip install mysqlclient and it says

Requirement already satisfied: mysqlclient in c:\program files\python37\lib\site-packages (1.3.12)

I have MySQL installed with the connector as well

but when i try to pip install MySQL-python

It Throws an error. it says Failed building Wheel for MySQL-python... it also throws this exception

try: import MySQLdb as Database except ImportError as err: raise ImproperlyConfigured( 'Error loading MySQLdb module.\n' 'Did you install mysqlclient?' ) from err

When i try to migrate the database, it doesnt migrate because it says mysql is not linked...

Upvotes: 0

Views: 508

Answers (1)

Umair Lakhani
Umair Lakhani

Reputation: 211

python37 doesn't support mysql yet.

Try this:

python3 -m pip install PyMySQL

Requirements

Python – one of the following:

  • CPython >= 2.7 or >= 3.4
  • Latest PyPy
  • MySQL Server – one of the following:
  • MySQL >= 5.5
  • MariaDB >= 5.5

https://pymysql.readthedocs.io/en/latest/user/installation.html

Upvotes: 2

Related Questions