Hello All,
I have an error while connecting django to mysql server.
can any one help me with this?
it shows following error.
I have an error while connecting django to mysql server.
can any one help me with this?
it shows following error.
Output:PS C:\Users\sures\Desktop\Project\1\healthinsurance> python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
Exception in thread django-main-thread:
Error:Traceback (most recent call last):
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\django\db\backends\base\base.py", line 282, in ensure_connection
self.connect()
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\django\db\backends\base\base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\django\db\backends\mysql\base.py", line 247, in get_new_connection
connection = Database.connect(**conn_params)
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\MySQLdb\__init__.py", line 121, in Connect
return Connection(*args, **kwargs)
File "C:\Users\sures\AppData\Local\Programs\Python\Python310\lib\site-packages\MySQLdb\connections.py", line 195, in __init__
super().__init__(*args, **kwargs2)
MySQLdb.OperationalError: (2002, "Can't connect to server on 'localhost' (10061)")
buran write May-20-2024, 07:16 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.