Objective
This article is mainly about the use of Yum to install MySQLdb module steps, the following words do not say more, to see the detailed introduction bar.
Steps are as follows
MySQLdb depends on the Mysql-devel package, so first we need to install the Mysql-devel package first.
One, you can go to the official website download Mysqldevel rpm package, and then installed on the server.
Second, directly with Yum installation MySQLdb
Yum Install-y Mysqldb-python
Third, verify the MySQLdb module is installed successfully
[root@ip-172-31-1-8 ~]# python
python 2.7.10 (default, Dec 8 2015, 18:25:23)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9) ] on linux2
Type ' help ', ' copyright ', ' credits ' or ' license ' for the more information.
>>> import MySQLdb
>>>
# import does not show any prompts or errors, even if the MySQLdb module package is successfully installed
Summarize
The above is about the use of Yum installation MySQLdb module of all the steps, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.