简体   繁体   中英

Unable to connect with MySQL from Python 2.7. (Unable to connect to localhost)

I am trying to run a module in python2.7 on my Windows 7 PC but it seems that I cannot connect with MySql server. The error I get is the following:

OperationalError: (_mysql_exceptions.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' (10061)")

1) Python module I am trying to run: https://snipboard.io/eaZNSn.jpg

2) Error I get: https://snipboard.io/761UoR.jpg

3) MySql installer: https://snipboard.io/o35n2l.jpg

4) Windows Services: https://snipboard.io/CI9JPa.jpg , MySql80 starts properly, Mysql cannot start.

5) Mysql: https://snipboard.io/iuaVEA.jpg

What I have tried: installing the mysqld.exe from cmd. https://snipboard.io/qYafIM.jpg

Are you sure that the MySQL server is running on port 10061? The default port for MySQL is 3306. Try to connect using port 3306 from the python module.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM