Skip to content

Commit 009f157

Browse files
committed
Update INSTALL doc
1 parent 0d3f364 commit 009f157

File tree

1 file changed

+13
-71
lines changed

1 file changed

+13
-71
lines changed

INSTALL

Lines changed: 13 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,25 @@ MySQLdb Installation
88
Prerequisites
99
-------------
1010

11-
+ Python 2.3.4 or higher
11+
+ Python 2.6, 2.7, 3.3 or higher
1212

1313
* http://www.python.org/
1414

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-
2415
+ setuptools
2516

2617
* http://pypi.python.org/pypi/setuptools
2718

28-
+ MySQL 3.23.32 or higher
19+
+ MySQL 5.0 or higher
2920

3021
* http://www.mysql.com/downloads/
3122

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.
4424

4525
* MySQL-5.0 is supported and tested, including stored procedures.
4626

4727
* MySQL-5.1 is supported (currently a release candidate) but untested.
4828
It should work.
4929

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-
6230
* Red Hat Linux packages:
6331

6432
- mysql-devel to compile
@@ -75,38 +43,15 @@ Prerequisites
7543

7644
- MySQL-shared to run if you compiled with MySQL-shared installed
7745

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-
9946
+ C compiler
10047

10148
* Most free software-based systems already have this, usually gcc.
10249

10350
* Most commercial UNIX platforms also come with a C compiler, or
10451
you can also use gcc.
10552

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++.
11055

11156

11257
Building and installing
@@ -134,12 +79,18 @@ edit the [options] section of site.cfg:
13479
if True, try to link against a static library; otherwise link
13580
against dynamic libraries (default). You may need static linking
13681
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.
13785

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.
13889

13990
Finally, putting it together::
14091

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
14394
$ # edit site.cfg if necessary
14495
$ python setup.py build
14596
$ 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
168119
no mysql_config in the MySQL package.
169120

170121

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-
180122
Binary Packages
181123
---------------
182124

0 commit comments

Comments
 (0)