@@ -8,57 +8,25 @@ MySQLdb Installation
8
8
Prerequisites
9
9
-------------
10
10
11
- + Python 2.3.4 or higher
11
+ + Python 2.6, 2.7, 3.3 or higher
12
12
13
13
* http://www.python.org/
14
14
15
- * Versions lower than 2.3 WON'T WORK.
16
-
17
- * 2.4 is the primary test environment.
18
-
19
- * Red Hat Linux:
20
-
21
- - Make sure you have the Python development headers and libraries
22
- (python-devel).
23
-
24
15
+ setuptools
25
16
26
17
* http://pypi.python.org/pypi/setuptools
27
18
28
- + MySQL 3.23.32 or higher
19
+ + MySQL 5.0 or higher
29
20
30
21
* http://www.mysql.com/downloads/
31
22
32
- * Versions lower than 3.22 definitely WON'T WORK.
33
-
34
- * Versions lower than 3.22.19 might not work.
35
-
36
- * MySQL-3.22 might work but isn't supported anymore. It's very old.
37
-
38
- * MySQL-3.23 ought to work, but it's pretty elderly.
39
-
40
- * MySQL-4.0 is supported, but not tested and slightly discouraged.
41
-
42
- * MySQL-4.1 is supported. The prepared statements API is not
43
- supported, and won't be until MySQLdb-1.3 or 2.0, if ever.
23
+ * MySQL-4.0 and MySQL-4.1 may work, but not supported.
44
24
45
25
* MySQL-5.0 is supported and tested, including stored procedures.
46
26
47
27
* MySQL-5.1 is supported (currently a release candidate) but untested.
48
28
It should work.
49
29
50
- * MySQL-6.0 is sorta-kinda-supported (currently alpha) but untested.
51
- It should work.
52
-
53
- * Drizzle <https://launchpad.net/drizzle> is a fork of MySQL. So far
54
- the C API looks really similar except everything is renamed.
55
- Drizzle support probably won't happen in 1.2. There may be have to
56
- be an entirely different module, but still using DB-API.
57
-
58
- * MaxDB, formerly known as SAP DB (and maybe Adabas D?), is a
59
- completely different animal. Use the sapdb.sql module that comes
60
- with MaxDB.
61
-
62
30
* Red Hat Linux packages:
63
31
64
32
- mysql-devel to compile
@@ -75,38 +43,15 @@ Prerequisites
75
43
76
44
- MySQL-shared to run if you compiled with MySQL-shared installed
77
45
78
- * Transactions (particularly InnoDB tables) are supported for
79
- MySQL-3.23 and up. You may need a special package from your vendor
80
- with this support turned on.
81
-
82
- + zlib
83
-
84
- * Required for MySQL-3.23 and newer.
85
-
86
- * Red Hat Linux
87
-
88
- - zlib-devel to compile
89
-
90
- - zlib to run
91
-
92
- + openssl
93
-
94
- * May be needed for MySQL-4.0 or newer, depending on compilation
95
- options. If you need it, you probably already have it.
96
-
97
- - you may need openssl-devel on some platforms
98
-
99
46
+ C compiler
100
47
101
48
* Most free software-based systems already have this, usually gcc.
102
49
103
50
* Most commercial UNIX platforms also come with a C compiler, or
104
51
you can also use gcc.
105
52
106
- * If you have some Windows flavor, you usually have to pay extra
107
- for this, or you can use Cygwin_.
108
-
109
- .. _Cygwin: http://www.cygwin.com/
53
+ * If you have some Windows flavor, you should use Windows SDK or
54
+ Visual C++.
110
55
111
56
112
57
Building and installing
@@ -134,12 +79,18 @@ edit the [options] section of site.cfg:
134
79
if True, try to link against a static library; otherwise link
135
80
against dynamic libraries (default). You may need static linking
136
81
to use the embedded server.
82
+ This option doesn't work for MySQL>5.6 since libmysqlclient
83
+ requires libstdc++. If you want to use, add `-lstdc++` to
84
+ mysql_config manually.
137
85
86
+ If `<mysql prefix>/lib` is not added to `/etc/ld.so.conf`, `import _mysql`
87
+ doesn't work. To fix this, (1) set `LD_LIBRARY_PATH`, or (2) add
88
+ `-Wl,-rpath,<mysql prefix>/lib` to ldflags in your mysql_config.
138
89
139
90
Finally, putting it together::
140
91
141
- $ tar xfz MySQL-python-1.2.1 .tar.gz
142
- $ cd MySQL-python-1.2.1
92
+ $ tar xz mysqlclient-1.3.6 .tar.gz
93
+ $ cd mysqlclient-1.3.6
143
94
$ # edit site.cfg if necessary
144
95
$ python setup.py build
145
96
$ sudo python setup.py install # or su first
@@ -168,15 +119,6 @@ On Windows, you will definitely have to edit site.cfg since there is
168
119
no mysql_config in the MySQL package.
169
120
170
121
171
- Zope
172
- ....
173
-
174
- If you are using a binary package of Zope, you need run setup.py with
175
- the python executable that came with Zope. Otherwise, you'll install
176
- into the wrong Python tree and Zope (ZMySQLDA) will not be able to
177
- find _mysql.
178
-
179
-
180
122
Binary Packages
181
123
---------------
182
124
0 commit comments