简体   繁体   中英

Which of the 'MySQL-Python' connector should I install?

I use MariaDB 10, and I had installed the mysql-connector-python on CentOS server for over a year. Also I had installed on my Mac.

Now I formatted the two machines, and can not install on anyone.

sudo pip install mysql-connector-python

sudo pip install mysql-connector-python错误

pip search mysql | grep python

pip search mysql | grep python

Which of connectors should I install? and how to install? And how should I install? In CentOS and tried:

sudo yum -y install MySQL-python perl-DBD-MySQL php-mysql postfix
sudo pip install mysql-connector-python-rf

And appear this error:

在此输入图像描述

On my Mac I have the same problem with mysql-connector-python-rf .

UPDATED sudo yum install mysql-community-release ERROR

From the website :

Installing Connector/Python on Linux Using the MySQL Yum Repository

For EL6 or EL7-based platforms and Fedora 19 or 20, you can install Connector/Python using the MySQL Yum repository (see Installing Additional MySQL Products and Components with Yum). You must have the MySQL Yum repository on your system's repository list (for details, see Adding the MySQL Yum Repository). To make sure that your Yum repository is up-to-date, use this command:

shell> sudo yum update mysql-community-release

Then install Connector/Python as follows:

shell> sudo yum install mysql-connector-python

I am using this on Fedora, and it works like a charm.

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