先判断是否已安装,mysql驱动: 没有安装,执行以下语句:yum -y install mysql-connector-pythonyum -y install MySQL-python执行成功再验证下: