Mercurial > p > roundup > code
annotate doc/mysql.txt @ 5272:c6fbd4803eae
If you upgrade to the newer query edit interface but did not allow
users full access to search queries, the edit interface displays
public queries that the user does not own in the section labeled
"Queries I created".
Updated upgrading.txt to discuss this problem and link back to the
1.4.17 upgrading instructions. Also included schema.py permissions
that can be used to make the edit interface work correctly without
allow full search access for queries.
Updated the test script in the 1.4.17 upgrading instructions to
display protected properties (like creator) to make dignosing this
easier.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 23 Sep 2017 13:05:48 -0400 |
| parents | 98fdc1f98194 |
| children | e2978ed3b550 64ceb9c14b28 |
| rev | line source |
|---|---|
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
1 ============= |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
2 MySQL Backend |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
3 ============= |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
4 |
|
1839
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
5 This notes detail the MySQL backend for the Roundup issue tracker. |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
7 |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
8 Prerequisites |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
9 ============= |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
10 |
|
1706
5a28eea9a33c
rewrite to fix english.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
1705
diff
changeset
|
11 To use MySQL as the backend for storing roundup data, you also need |
|
5a28eea9a33c
rewrite to fix english.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
1705
diff
changeset
|
12 to install: |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
13 |
|
3929
a472391156ae
mysql table creation syntax change
Justus Pendleton <jpend@users.sourceforge.net>
parents:
2921
diff
changeset
|
14 1. MySQL RDBMS 4.0.18 or higher - http://www.mysql.com. Your MySQL |
|
1839
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
15 installation MUST support InnoDB tables (or Berkeley DB (BDB) tables |
|
3929
a472391156ae
mysql table creation syntax change
Justus Pendleton <jpend@users.sourceforge.net>
parents:
2921
diff
changeset
|
16 if you have no other choice). If you're running < 4.0.18 (but not <4.0) |
|
1913
d929c31a3620
clarified minimum version required for MySQL backend (4.0.16)
Richard Jones <richard@users.sourceforge.net>
parents:
1912
diff
changeset
|
17 then you'll need to use BDB to pass all unit tests. Edit the |
|
d929c31a3620
clarified minimum version required for MySQL backend (4.0.16)
Richard Jones <richard@users.sourceforge.net>
parents:
1912
diff
changeset
|
18 ``roundup/backends/back_mysql.py`` file to enable DBD instead of InnoDB. |
|
1839
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
19 2. Python MySQL interface - http://sourceforge.net/projects/mysql-python |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
20 |
|
5137
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
21 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
22 Other Configuration |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
23 =================== |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
24 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
25 If you are indexing large documents (e.g attached file contents) |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
26 using MySQL, you may need to increase the max_allowed_packet size. |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
27 If you don't you can see the error:: |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
28 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
29 'MySql Server has gone away (2006)' |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
30 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
31 To do this edit /etc/my.conf and change:: |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
32 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
33 [mysqld] |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
34 max_allowed_packet = 1M |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
35 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
36 the 'max_allowed_packet' value from '1M' to '64M' or |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
37 larger. |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
38 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
39 Alternatively you can install an alternate indexer (whoosh, xapian |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
40 etc.) and force the tracker to use it by setting the ``indexer`` |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
41 setting in the tracker's ``config.ini``. |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
42 |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
43 This fix was supplied by telsch. See issue |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
44 http://issues.roundup-tracker.org/issue2550743 for further info or if |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
45 you are interested in developing a patch to roundup to help work |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
46 around this issue. |
|
98fdc1f98194
issue2550743 - Reindex with MySQL Server failed. It looks like
John Rouillard <rouilj@ieee.org>
parents:
4557
diff
changeset
|
47 |
|
1706
5a28eea9a33c
rewrite to fix english.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
1705
diff
changeset
|
48 Running the MySQL tests |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
49 ======================= |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
50 |
|
1706
5a28eea9a33c
rewrite to fix english.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
1705
diff
changeset
|
51 Roundup tests expect an empty MySQL database. Two alternate ways to provide |
|
5a28eea9a33c
rewrite to fix english.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
1705
diff
changeset
|
52 this: |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
53 |
|
1839
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
54 1. If you have root permissions on the MySQL server, you can create |
|
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
55 the necessary database entries using the follwing SQL sequence. Use |
|
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
56 ``mysql`` on the command line to enter:: |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
57 |
|
1839
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
58 CREATE DATABASE rounduptest; |
|
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
59 USE rounduptest; |
|
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
60 GRANT ALL PRIVILEGES ON rounduptest.* TO rounduptest@localhost |
|
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
61 IDENTIFIED BY 'rounduptest'; |
|
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
62 FLUSH PRIVILEGES; |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
63 |
|
1839
06f5b36b201b
Fix a couple of failures in mysql backend unit tests.
Richard Jones <richard@users.sourceforge.net>
parents:
1706
diff
changeset
|
64 2. If your administrator has provided you with database connection info, |
|
4513
6a32a2fb95b4
Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
3929
diff
changeset
|
65 see the config values in 'test/db_test_base.py' |
|
6a32a2fb95b4
Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
3929
diff
changeset
|
66 about which database connection, name and user will be used. |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
67 |
| 2409 | 68 The MySQL database should not contain any tables. Tests will not |
|
1706
5a28eea9a33c
rewrite to fix english.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
1705
diff
changeset
|
69 drop the database with existing data. |
|
1433
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
70 |
|
8429095241d7
mysql tests will not be run if there is no chance of passing.
Andrey Lebedev <kedder@users.sourceforge.net>
parents:
diff
changeset
|
71 |
|
2067
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
72 Showing MySQL who's boss |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
73 ======================== |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
74 |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
75 If things ever get to the point where that test database is totally hosed, |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
76 just:: |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
77 |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
78 $ su - |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
79 # /etc/init.d/mysql stop |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
80 # rm -rf /var/lib/mysql/rounduptest |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
81 # /etc/init.d/mysql start |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
82 |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
83 and all will be better (note that on some systems, ``mysql`` is spelt |
|
dbb78664e427
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
1913
diff
changeset
|
84 ``mysqld``). |
|
2921
ad4fb8a14a97
more doc updates, not so many TODOs any more
Richard Jones <richard@users.sourceforge.net>
parents:
2860
diff
changeset
|
85 |
