diff options
Diffstat (limited to 'doc/ex-meta1.texi')
-rw-r--r-- | doc/ex-meta1.texi | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/ex-meta1.texi b/doc/ex-meta1.texi index d74b49c..a62b4be 100644 --- a/doc/ex-meta1.texi +++ b/doc/ex-meta1.texi | |||
@@ -13,19 +13,18 @@ of which uses a separate configuration file. | |||
13 | To reduce the number of connections to the @acronym{MySQL} server, | 13 | To reduce the number of connections to the @acronym{MySQL} server, |
14 | the @acronym{MySQL} database will be opened at the module level and | 14 | the @acronym{MySQL} database will be opened at the module level and |
15 | shared between the two smap databases. Thus, the module | 15 | shared between the two smap databases. Thus, the module |
16 | initialization in @file{smapd.conf} looks like: | 16 | initialization in @file{smapd.conf} looks like: |
17 | 17 | ||
18 | @example | 18 | @example |
19 | module mysql mysql open config-group=smap | 19 | module mysql mysql config-group=smap |
20 | @end example | 20 | @end example |
21 | 21 | ||
22 | The @samp{open} parameter instructs the module to open the requested | 22 | The @samp{config-group} parameter refers to a group name in the |
23 | databases. The @samp{config-group} parameter refers to a group | 23 | default @file{/etc/my.cnf} file that contains information about the |
24 | name in the default @file{/etc/my.cnf} file that contains information | 24 | @acronym{MySQL} database and credentials for accessing it. |
25 | about the @acronym{MySQL} database and credentials for accessing it. | ||
26 | The following is a sample snippet from @file{/etc/my.cnf}: | 25 | The following is a sample snippet from @file{/etc/my.cnf}: |
27 | 26 | ||
28 | @example | 27 | @example |
29 | [smap] | 28 | [smap] |
30 | database = Mail | 29 | database = Mail |
31 | user = smap | 30 | user = smap |
@@ -58,13 +57,12 @@ CREATE TABLE userdb ( | |||
58 | 57 | ||
59 | The smap database is defined as follows: | 58 | The smap database is defined as follows: |
60 | 59 | ||
61 | @example | 60 | @example |
62 | @group | 61 | @group |
63 | database userdb mysql \ | 62 | database userdb mysql \ |
64 | defaultdb | ||
65 | query="SELECT user FROM userdb WHERE user='$key'" | 63 | query="SELECT user FROM userdb WHERE user='$key'" |
66 | positive-reply=OK | 64 | positive-reply=OK |
67 | @end group | 65 | @end group |
68 | @end example | 66 | @end example |
69 | 67 | ||
70 | The @samp{defaultdb} parameter tells it to use the default SQL | 68 | The @samp{defaultdb} parameter tells it to use the default SQL |