![pySQL_iss](https://raw.githubusercontent.com/98672794/Teaching2022/main/img/pySQL_iss.jpg)
MySQLdb._exceptions.OperationalError
MySQLdb._exceptions.OperationalError: (2002, "Can't connect to server on '127.0.0.1' (10061)")
Traceback (most recent call last)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask\app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask\app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask\app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask\app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask\app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask\app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "C:\Users\mokaki\Desktop\job2021\dwl\Flask_login\app.py", line 58, in login
curl = mysql.connection.cursor(MySQLdb.cursors.DictCursor)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask_mysqldb_init_.py", line 101, in connection
ctx.mysql_db = self.connect
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\flask_mysqldb_init_.py", line 88, in connect
return MySQLdb.connect(**kwargs)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\MySQLdb_init_.py", line 123, in Connect
return Connection(*args, **kwargs)
File "C:\Users\mokaki\AppData\Local\Programs\Python\Python310\Lib\site-packages\MySQLdb\connections.py", line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2002, "Can't connect to server on '127.0.0.1' (10061)")
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
pc win10
python3.10
thank you