ubuntu安装mysql-python相关问题

python2.7数据库中间件使用mysql-python,进入python虚拟环境,通过pip install mysql-python安装

python3使用pymysql,进入虚拟环境,通过pip install pymysql安装

安装完成后,在数据库连接时,要将驱动器设置成相应的名称:

python2.7:

DRIVER = "mysqldb"

python3:

DRIVER = "pymysql"


https://blog.csdn.net/zinnc/article/details/53779196

https://www.jianshu.com/p/df610a488a19

https://www.jianshu.com/p/11c845f75b9d

猜你喜欢

转载自blog.csdn.net/dongchongyang/article/details/80732885
今日推荐