Edgewall Software

Changes between Version 77 and Version 78 of MySqlDb


Ignore:
Timestamp:
Apr 19, 2022, 7:29:53 PM (3 months ago)
Author:
figaro
Comment:

Cosmetic updates

Legend:

Unmodified
Added
Removed
Modified
  • MySqlDb

    v77 v78  
    33= MySQL and its MySQLdb Python bindings
    44
    5 Trac supports the [http://mysql.com MySQL] database backend, although there are a couple of [#KnownIssues]. MySQL is fully
    6 integrated in our test suite.
     5Trac supports the [http://mysql.com MySQL] database backend, although there are a couple of [#KnownIssues]. MySQL is fully integrated in Trac's test suite.
    76
    87== Requirements
    98=== MySQL
    109
    11 The recommended versions of MySQL are those from 5.x series.
     10The recommended versions of MySQL are those from 5.x series and above.
    1211
    13 The following MySQL dropin replacements are also known to work:
     12The following MySQL drop-in replacements are also known to work:
    1413 * The [http://askmonty.org/wiki/index.php/MariaDB MariaDB] variant:
    1514    - tested MariaDB 5.3.3, MySQLdb 1.2.3 and Trac 0.12.3
     
    1817    - tested Percona 5.6 with Trac 1.1.4
    1918
    20 In order to avoid Unicode and international characters problems in Trac, eg international characters turning into question marks with mysterious **"Incorrect string value"** errors logged, the Trac database '''must''' be configured with one of the following character set and collation type pairs:
     19To avoid Unicode and international character conflicts in Trac, such as international characters turning into question marks with mysterious **"Incorrect string value"** errors logged, the Trac database '''must''' be configured with one of the following character set and collation type pairs:
    2120* `utf8` / `utf8_bin`
    2221* `utf8mb4` / `utf8mb4_bin`
     
    3736}}}
    3837
    39 To check character set settings for your database, issue the following commands:
     38To check the character set settings for your database, issue the following commands:
    4039{{{#!sql
    4140mysql> USE trac;
     
    9392The recommended version is [pypi:MySQL-python MySQL-python 1.2.2+], which must be compiled in ''thread-safe client'' mode. Earlier versions are known to be problematic.
    9493
    95 The [pypi:MySQL-python MySQL-python] page on PyPI contains links to the `.tar.gz` source distribution.
     94The [pypi:MySQL-python] page on PyPI contains links to the `.tar.gz` source distribution.
    9695
    9796For Windows, there are several possibilities:
    9897 - the PyPI page mentioned above also links to pre-built Windows eggs, but for Python 2.7 32-bits only.
    99  - Python binaries (32-bits and 64-bits) can be found at codegood.com [http://www.codegood.com/archives/4 for Python 2.6] and [http://www.codegood.com/archives/129 for Python 2.7]; however they have been last updated in 2010, so it only proposes version 1.2.3, which should however work fine
    100  - recent Python 2.7 wheels (32-bits and 64-bits) can be found in the [http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python Unofficial Windows Binaries for Python Extension Packages], kindly provided by Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine.
     98 - Python binaries (32-bits and 64-bits) can be found at codegood.com [http://www.codegood.com/archives/4 for Python 2.6] and [http://www.codegood.com/archives/129 for Python 2.7]; these have been last updated in 2010, so it only proposes version 1.2.3, which should however work fine.
     99 - Python 2.7 wheels (32-bits and 64-bits) can be found in the [http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python Unofficial Windows Binaries for Python Extension Packages], kindly provided by Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine.
    101100 - if you are using ActiveState Python 2.6 on Windows, you can install with `pypm install mysql-python`
    102  - last but not least, the [http://conda.pydata.org/docs/ Conda] project also contains recent versions of this package and it's handy for use by continuous integration systems as the package can be installed non-interactively using a simple `conda install -qy mysql-python` command (32-bits and 64-bits)
     101 - the [https://docs.conda.io/en/latest/ Conda] project also contains recent versions of this package and it's handy for use by continuous integration systems as the package can be installed non-interactively using the command `conda install -qy mysql-python` (32-bits and 64-bits).
    103102
    104103On FreeBSD this package is called {{{py-MySQLdb}}} in [http://www.freshports.org/databases/py-MySQLdb55/ the ports collection].
    105104
    106 
    107105==== Thread-safety is important
    108106
    109 You should make sure that you're using a thread-safe version of the bindings.
     107You should make sure that you are using a thread-safe version of the bindings.
    110108To verify this, you can check the ''System Information'' section in the ''About Trac'' page, when you are logged with a user having the `CONFIG_VIEW` or the `TRAC_ADMIN` permission.
    111109You should see a line reading: '''MySQL''' `server: "...", client: "...", thread-safe: 1`.
     
    120118==== Convert from MyISAM to InnoDB storage engine
    121119
    122 InnoDB is the default storage engine for MySQL since v5.5, but older databases may be defined using MyISAM.
    123 Check which tables are not already converted:
     120InnoDB is the default storage engine for since MySQL v5.5, but older databases may still use MyISAM. Check which tables use an unsupported storage engine:
    124121{{{#!sql
    125122SELECT table_name, engine FROM information_schema.tables WHERE table_schema = DATABASE();