Edgewall Software

Changes between Version 62 and Version 63 of MySqlDb


Ignore:
Timestamp:
Oct 1, 2012, 3:35:56 PM (12 years ago)
Author:
Thijs Triemstra
Comment:

update view links

Legend:

Unmodified
Added
Removed
Modified
  • MySqlDb

    v62 v63  
    9595On FreeBSD this package is called {{{py-MySQLdb}}} (in ports).
    9696
    97 If you are using ActiveState Python 2.6 on Window, you can install with {{{pypm install mysql-python}}}.
     97If you are using ActiveState Python 2.6 on Windows, you can install with {{{pypm install mysql-python}}}.
    9898
    9999==== thread-safety is important ====
     
    102102You should see a line reading: '''MySQL''' `server: "...", client: "...", thread-safe: 1`.
    103103If 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]
    106106
    107107Note 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.