Changes between Version 62 and Version 63 of MySqlDb
- Timestamp:
- Oct 1, 2012, 3:35:56 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MySqlDb
v62 v63 95 95 On FreeBSD this package is called {{{py-MySQLdb}}} (in ports). 96 96 97 If you are using ActiveState Python 2.6 on Window , you can install with {{{pypm install mysql-python}}}.97 If you are using ActiveState Python 2.6 on Windows, you can install with {{{pypm install mysql-python}}}. 98 98 99 99 ==== thread-safety is important ==== … … 102 102 You should see a line reading: '''MySQL''' `server: "...", client: "...", thread-safe: 1`. 103 103 If you're seeing `thread-safe: 0` instead, the MySQL-python version you're using was not correctly built. Check the following resources to see what you should do: 104 - [http://mysql-python.svn.sourceforge.net/viewvc/mysql-python/tags/MySQLdb-1.2. 2/MySQLdb/README?revision=499&view=raw MySQLdb-1.2.2/MySQLdb/README], see the ''Building and installing'' section,105 - [http://mysql-python.svn.sourceforge.net/viewvc/mysql-python/tags/MySQLdb-1.2. 2/MySQLdb/site.cfg?revision=499&view=raw MySQLdb-1.2.2/MySQLdb/site.cfg]104 - [http://mysql-python.svn.sourceforge.net/viewvc/mysql-python/tags/MySQLdb-1.2.3/MySQLdb/README?revision=646 MySQLdb-1.2.3/MySQLdb/README], see the ''Building and installing'' section, 105 - [http://mysql-python.svn.sourceforge.net/viewvc/mysql-python/tags/MySQLdb-1.2.3/MySQLdb/site.cfg?revision=646&content-type=text%2Fplain MySQLdb-1.2.3/MySQLdb/site.cfg] 106 106 107 107 Note that even if you build MySQLdb to use the thread-safe libraries, ''About Trac'' may still report that it is not thread-safe. If that happens, verify that it is thread-safe by calling `MySQLdb.thread_safe()` from a standalone Python script (i.e., not under Apache). If the stand-alone test reports that MySQLdb is indeed thread-safe, then the problem may lie with the PHP module. For example, the Red Hat rpm for PHP is built to use the non-thread-safe MySQL libraries, and the Apache PHP module apparently gets loaded first. So when Python and MySQLdb load, they end up using the already loaded MySQL libraries, which are not thread-safe. The circumvention for this problem is to replace the non-thread-safe libs in `/usr/lib/mysql` with soft links, so as to have the non-thread-safe lib names point to the thread-safe libs; restart Apache, and now Trac should be running in thread-safe mode.