Home > Net >  Can't get mysql-connector to work properly
Can't get mysql-connector to work properly

Time:10-19

I am trying to connect to a database and for that I am using mysql-connector. The code is correct but I get the following error message:

ERROR: HTTP error 404 while getting https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz

If I use command window and type the following:

pip search mysql-connector

I get the error:

ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.

I have also already installed mysql-connector by using:

pip install mysql-connector-python
Requirement already satisfied: mysql-connector-python in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (8.0.26)
Requirement already satisfied: protobuf>=3.0.0 in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (from mysql-connector-python) (3.18.1)

So why do I get that error message?

CodePudding user response:

A note: pip search not working is intended, as the error says - pip list/search was abused and was disabled. You should use PyPI manually to access information on packages - https://pypi.org/project/mysql-connector-python

As to your error... it tries to download mysql-connector-python-2.1.3.tar.gz, while your pip says Requirement already satisfied: mysql-connector-python in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (8.0.26).

Look at the versions: 2.1.3 vs 8.0.26.

This means you either use wrong python version to run the project or something inside tries to use (and download) some really old code. Which is just no longer hosted at that url, hence you get 404 (not found).

  • Related