Django mysqlclient backend produces django.db.utils.OperationalError: (2059, ) in Windows
up vote
0
down vote
favorite
I'm trying to get my Django project running on a Windows 10 computer and it throws a very unspecific error when trying to establish a database connection.
In this SO-post the problem was with the authentication, but in that post details about the error is displayed instead of <NULL> which gives very little to go on.
The entire error looks like this:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000018C3B8761E0>
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2059, <NULL>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsautoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementcommandsrunserver.py", line 120, in inner_run
self.check(display_num_errors=True)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksregistry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksmodel_checks.py", line 27, in check_all_models
errors.extend(model.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1200, in check
errors.extend(cls._check_fields(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1272, in _check_fields
errors.extend(field.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 894, in check
errors = super().check(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 206, in check
errors.extend(self._check_backend_specific_checks(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 303, in _check_backend_specific_checks
return connections[db].validation.check_field(self, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasevalidation.py", line 21, in check_field
field_type = field.db_type(self.connection)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 648, in db_type
return connection.data_types[self.get_internal_type()] % data
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 133, in data_types
if self.features.supports_microsecond_precision:
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlfeatures.py", line 65, in supports_microsecond_precision
return self.connection.mysql_version >= (5, 6, 4)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 345, in mysql_version
with self.temporary_connection() as cursor:
File "C:UsersmarcuAppDataLocalProgramsPythonPython36libcontextlib.py", line 81, in __enter__
return next(self.gen)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 576, in temporary_connection
cursor = self.cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 255, in cursor
return self._cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 232, in _cursor
self.ensure_connection()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbutils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2059, <NULL>)
Using python 3.6.6 and mysqlclient 1.3.13, although 1.3.12 has also been tried.
Database settings:
DATABASES = {
'default': {
'ENGINE': "django.db.backends.mysql", # 'mysql.connector.django'
'NAME': 'testdb',
'USER': 'root',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'autocommit': True,
},
},
}
python mysql django python-3.x database-connection
add a comment |
up vote
0
down vote
favorite
I'm trying to get my Django project running on a Windows 10 computer and it throws a very unspecific error when trying to establish a database connection.
In this SO-post the problem was with the authentication, but in that post details about the error is displayed instead of <NULL> which gives very little to go on.
The entire error looks like this:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000018C3B8761E0>
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2059, <NULL>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsautoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementcommandsrunserver.py", line 120, in inner_run
self.check(display_num_errors=True)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksregistry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksmodel_checks.py", line 27, in check_all_models
errors.extend(model.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1200, in check
errors.extend(cls._check_fields(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1272, in _check_fields
errors.extend(field.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 894, in check
errors = super().check(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 206, in check
errors.extend(self._check_backend_specific_checks(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 303, in _check_backend_specific_checks
return connections[db].validation.check_field(self, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasevalidation.py", line 21, in check_field
field_type = field.db_type(self.connection)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 648, in db_type
return connection.data_types[self.get_internal_type()] % data
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 133, in data_types
if self.features.supports_microsecond_precision:
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlfeatures.py", line 65, in supports_microsecond_precision
return self.connection.mysql_version >= (5, 6, 4)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 345, in mysql_version
with self.temporary_connection() as cursor:
File "C:UsersmarcuAppDataLocalProgramsPythonPython36libcontextlib.py", line 81, in __enter__
return next(self.gen)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 576, in temporary_connection
cursor = self.cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 255, in cursor
return self._cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 232, in _cursor
self.ensure_connection()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbutils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2059, <NULL>)
Using python 3.6.6 and mysqlclient 1.3.13, although 1.3.12 has also been tried.
Database settings:
DATABASES = {
'default': {
'ENGINE': "django.db.backends.mysql", # 'mysql.connector.django'
'NAME': 'testdb',
'USER': 'root',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'autocommit': True,
},
},
}
python mysql django python-3.x database-connection
Please post your database settings in Django.
– Sachin Kukreja
Aug 20 at 7:46
@SachinKukreja Added to post!
– Marcus Grass
Aug 20 at 7:55
Are you able to authenticate into the mysql client (without using Django)?
– Sachin Kukreja
Aug 20 at 8:17
@SachinKukreja yeah, using mysql-connector-python also "works", although it led to other problems...stackoverflow.com/questions/51920779/…
– Marcus Grass
Aug 20 at 8:20
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to get my Django project running on a Windows 10 computer and it throws a very unspecific error when trying to establish a database connection.
In this SO-post the problem was with the authentication, but in that post details about the error is displayed instead of <NULL> which gives very little to go on.
The entire error looks like this:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000018C3B8761E0>
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2059, <NULL>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsautoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementcommandsrunserver.py", line 120, in inner_run
self.check(display_num_errors=True)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksregistry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksmodel_checks.py", line 27, in check_all_models
errors.extend(model.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1200, in check
errors.extend(cls._check_fields(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1272, in _check_fields
errors.extend(field.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 894, in check
errors = super().check(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 206, in check
errors.extend(self._check_backend_specific_checks(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 303, in _check_backend_specific_checks
return connections[db].validation.check_field(self, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasevalidation.py", line 21, in check_field
field_type = field.db_type(self.connection)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 648, in db_type
return connection.data_types[self.get_internal_type()] % data
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 133, in data_types
if self.features.supports_microsecond_precision:
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlfeatures.py", line 65, in supports_microsecond_precision
return self.connection.mysql_version >= (5, 6, 4)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 345, in mysql_version
with self.temporary_connection() as cursor:
File "C:UsersmarcuAppDataLocalProgramsPythonPython36libcontextlib.py", line 81, in __enter__
return next(self.gen)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 576, in temporary_connection
cursor = self.cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 255, in cursor
return self._cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 232, in _cursor
self.ensure_connection()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbutils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2059, <NULL>)
Using python 3.6.6 and mysqlclient 1.3.13, although 1.3.12 has also been tried.
Database settings:
DATABASES = {
'default': {
'ENGINE': "django.db.backends.mysql", # 'mysql.connector.django'
'NAME': 'testdb',
'USER': 'root',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'autocommit': True,
},
},
}
python mysql django python-3.x database-connection
I'm trying to get my Django project running on a Windows 10 computer and it throws a very unspecific error when trying to establish a database connection.
In this SO-post the problem was with the authentication, but in that post details about the error is displayed instead of <NULL> which gives very little to go on.
The entire error looks like this:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000018C3B8761E0>
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2059, <NULL>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsautoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementcommandsrunserver.py", line 120, in inner_run
self.check(display_num_errors=True)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocoremanagementbase.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksregistry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangocorechecksmodel_checks.py", line 27, in check_all_models
errors.extend(model.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1200, in check
errors.extend(cls._check_fields(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsbase.py", line 1272, in _check_fields
errors.extend(field.check(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 894, in check
errors = super().check(**kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 206, in check
errors.extend(self._check_backend_specific_checks(**kwargs))
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 303, in _check_backend_specific_checks
return connections[db].validation.check_field(self, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasevalidation.py", line 21, in check_field
field_type = field.db_type(self.connection)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbmodelsfields__init__.py", line 648, in db_type
return connection.data_types[self.get_internal_type()] % data
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 133, in data_types
if self.features.supports_microsecond_precision:
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlfeatures.py", line 65, in supports_microsecond_precision
return self.connection.mysql_version >= (5, 6, 4)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangoutilsfunctional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 345, in mysql_version
with self.temporary_connection() as cursor:
File "C:UsersmarcuAppDataLocalProgramsPythonPython36libcontextlib.py", line 81, in __enter__
return next(self.gen)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 576, in temporary_connection
cursor = self.cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 255, in cursor
return self._cursor()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 232, in _cursor
self.ensure_connection()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbutils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 216, in ensure_connection
self.connect()
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsbasebase.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesdjangodbbackendsmysqlbase.py", line 236, in get_new_connection
return Database.connect(**conn_params)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdb__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "D:ProgramLiquidMarketvenvlibsite-packagesMySQLdbconnections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2059, <NULL>)
Using python 3.6.6 and mysqlclient 1.3.13, although 1.3.12 has also been tried.
Database settings:
DATABASES = {
'default': {
'ENGINE': "django.db.backends.mysql", # 'mysql.connector.django'
'NAME': 'testdb',
'USER': 'root',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'autocommit': True,
},
},
}
python mysql django python-3.x database-connection
python mysql django python-3.x database-connection
edited Oct 11 at 19:59
Roman Pokrovskij
4,11233978
4,11233978
asked Aug 20 at 7:40
Marcus Grass
196114
196114
Please post your database settings in Django.
– Sachin Kukreja
Aug 20 at 7:46
@SachinKukreja Added to post!
– Marcus Grass
Aug 20 at 7:55
Are you able to authenticate into the mysql client (without using Django)?
– Sachin Kukreja
Aug 20 at 8:17
@SachinKukreja yeah, using mysql-connector-python also "works", although it led to other problems...stackoverflow.com/questions/51920779/…
– Marcus Grass
Aug 20 at 8:20
add a comment |
Please post your database settings in Django.
– Sachin Kukreja
Aug 20 at 7:46
@SachinKukreja Added to post!
– Marcus Grass
Aug 20 at 7:55
Are you able to authenticate into the mysql client (without using Django)?
– Sachin Kukreja
Aug 20 at 8:17
@SachinKukreja yeah, using mysql-connector-python also "works", although it led to other problems...stackoverflow.com/questions/51920779/…
– Marcus Grass
Aug 20 at 8:20
Please post your database settings in Django.
– Sachin Kukreja
Aug 20 at 7:46
Please post your database settings in Django.
– Sachin Kukreja
Aug 20 at 7:46
@SachinKukreja Added to post!
– Marcus Grass
Aug 20 at 7:55
@SachinKukreja Added to post!
– Marcus Grass
Aug 20 at 7:55
Are you able to authenticate into the mysql client (without using Django)?
– Sachin Kukreja
Aug 20 at 8:17
Are you able to authenticate into the mysql client (without using Django)?
– Sachin Kukreja
Aug 20 at 8:17
@SachinKukreja yeah, using mysql-connector-python also "works", although it led to other problems...stackoverflow.com/questions/51920779/…
– Marcus Grass
Aug 20 at 8:20
@SachinKukreja yeah, using mysql-connector-python also "works", although it led to other problems...stackoverflow.com/questions/51920779/…
– Marcus Grass
Aug 20 at 8:20
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
change the way of encryption of the new version mysql,because django cant support the new encryption
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
change the way of encryption of the new version mysql,because django cant support the new encryption
add a comment |
up vote
0
down vote
change the way of encryption of the new version mysql,because django cant support the new encryption
add a comment |
up vote
0
down vote
up vote
0
down vote
change the way of encryption of the new version mysql,because django cant support the new encryption
change the way of encryption of the new version mysql,because django cant support the new encryption
edited 21 hours ago
Pengyy
18.5k153951
18.5k153951
answered 21 hours ago
mengLV LI
72
72
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51926091%2fdjango-mysqlclient-backend-produces-django-db-utils-operationalerror-2059-nu%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Please post your database settings in Django.
– Sachin Kukreja
Aug 20 at 7:46
@SachinKukreja Added to post!
– Marcus Grass
Aug 20 at 7:55
Are you able to authenticate into the mysql client (without using Django)?
– Sachin Kukreja
Aug 20 at 8:17
@SachinKukreja yeah, using mysql-connector-python also "works", although it led to other problems...stackoverflow.com/questions/51920779/…
– Marcus Grass
Aug 20 at 8:20