86 | | Older versions can be found at the [https://sourceforge.net/projects/mysql-python/ mysql-python] sourceforge project: |
87 | | - MySQL-python 1.2.1_p2 was the previously recommended version |
88 | | - MySQL-python 1.2.0-3.2.2, MySQL-python 1.2.2b2) were reported to have issues (see #3645). |
89 | | - MySQL-python-1.2.2b2 was [googlegroups:trac-users:e291b3ecb4a990a1 reported] to solve an `AttributeError: 'array.array' object has no attribute 'startswith'` error seen when viewing a changeset... These problems ought to be fixed in 1.2.2b3; if they are not, or if you have other issues, please file a bug in the [https://sourceforge.net/tracker/?group_id=22307&atid=374932 MySQL-python Bug Tracker]. |
90 | | - ''NOTE: '' On FreeBSD this package is called py-MySQLdb (in ports) |
| 86 | Older versions can be found at the [https://sourceforge.net/projects/mysql-python/ mysql-python] Sourceforge project: |
| 87 | || '''Version''' || '''Notes''' || |
| 88 | || `MySQL-python 1.2.1_p2` || This was the previously recommended version || |
| 89 | || `MySQL-python 1.2.0-3.2.2`, `MySQL-python 1.2.2b2` || Reported to have issues (see #3645) || |
| 90 | || `MySQL-python-1.2.2b2` || Was [googlegroups:trac-users:e291b3ecb4a990a1 reported] to solve an `AttributeError: 'array.array' object has no attribute 'startswith'` error seen when viewing a changeset. These problems ought to be fixed in 1.2.2b3; if they are not, or if you have other issues, please file a bug in the [https://sourceforge.net/tracker/?group_id=22307&atid=374932 MySQL-python Bug Tracker] || |
102 | | 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. |
| 104 | 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. |
137 | | If you have some strange issues (typically `OperationalError: (2006, 'MySQL server has gone away')`, as in #3645, and your web frontend is Apache, you might have conflicting mysql libraries. Be sure to read: [mod-wsgi:ApplicationIssues#MySQL_Shared_Library_Conflicts]. Another possibility is that you've hit MySQL bug 36639, as explained in ticket:3645#comment:48. |
| 139 | If you have some strange issues (typically `OperationalError: (2006, 'MySQL server has gone away')`, as in #3645, and your web frontend is Apache, you might have conflicting MySQL libraries. Be sure to read: [mod-wsgi:ApplicationIssues#MySQL_Shared_Library_Conflicts]. Another possibility is that you've hit MySQL bug 36639, as explained in ticket:3645#comment:48. |
152 | | 1. Try first to login on the command-line using the user tracuser (mysql -p -h localhost -u tracuser) |
153 | | 1. Created user is not yet used by MySQL (Login to the MySQL server(as root): mysql -p and type FLUSH PRIVILEGES;) |
154 | | 1. The user is added but the host does not match in the mysql user table (I had this on my FreeBSD setup). mysql -p; use mysql; UPDATE user SET Host="localhost" WHERE User="tracuser"; FLUSH PRIVILEGES;) |
| 154 | 1. Try first to login on the command-line using the user `tracuser` (`mysql -p -h localhost -u tracuser`) |
| 155 | 1. Created user is not yet used by MySQL (Login to the MySQL server (as root) with`mysql -p` and type: `FLUSH PRIVILEGES;`) |
| 156 | 1. The user is added but the host does not match in the MySQL user table (occurred on a FreeBSD setup). Correct this with: `mysql -p; use mysql; UPDATE user SET Host="localhost" WHERE User="tracuser"; FLUSH PRIVILEGES;` |