JeffWen0105 / howhow

howhow 的GitHub
GNU General Public License v3.0
2 stars 0 forks source link

run not work #1

Open 98672794 opened 2 years ago

98672794 commented 2 years ago

pySQL_iss

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

JeffWen0105 commented 2 years ago

你並沒有安裝 MySQL 在本地機器上

JeffWen0105 commented 2 years ago

Make sure your are running mysql server on your server !!!!