我在Windows上使用ActiveState Python 3并希望连接到我的MySQL数据库.我听说那mysqldb是使用的模块.我找不到mysqldbPython 3.
是否存在可用于存在二进制文件的存储库mysqldb?如何在Windows上的Python 3中连接到MySQL?
我有一个CentOS盒子.
(venv)[root@localhost]# yum install MySQL-python
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.maine.edu
* epel: ftp.osuosl.org
* extras: mirror.us.leaseweb.net
* remi: rpms.famillecollet.com
* updates: mirrors.centarra.com
Setting up Install Process
Package MySQL-python-1.2.3-0.3.c1.1.el6.x86_64 already installed and latest version
Nothing to do
Run Code Online (Sandbox Code Playgroud)
...
(venv)[root@localhost]# python
Python 2.7.6 (default, May 20 2014, 20:23:08)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
Traceback (most recent call last): …Run Code Online (Sandbox Code Playgroud)