From 2716cc7ec18c1ec4d74571e1768bc7538cf35b9f Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Sat, 10 Sep 2016 14:53:04 +0000 Subject: [PATCH] Add a section with an example of connecting to mysql. Because I can never remember. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1760180 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_dbd.html.en | 23 +++++++++++++++++++++++ docs/manual/mod/mod_dbd.xml | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/docs/manual/mod/mod_dbd.html.en b/docs/manual/mod/mod_dbd.html.en index 4303fd95ae..52b9691675 100644 --- a/docs/manual/mod/mod_dbd.html.en +++ b/docs/manual/mod/mod_dbd.html.en @@ -48,6 +48,7 @@

Topics

top
+

Connecting

+ +

To connect to your database, you'll need to specify + a driver, and connection parameters. These vary from + one database engine to another. For example, to connect + to mysql, do the following:

+ +
DBDriver mysql
+DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa
+ + +

You can then use this connection in a variety of other + modules, including mod_rewrite, + mod_authn_dbd, and mod_lua. + Further usage examples appear in each of those modules' + documentation.

+ +

See DBDParams for connection string + information for each of the supported database drivers.

+ +
top
+

Apache DBD API

mod_dbd exports five functions for other modules to use. The API is as follows:

diff --git a/docs/manual/mod/mod_dbd.xml b/docs/manual/mod/mod_dbd.xml index 5c6e605fdc..227ab8e63b 100644 --- a/docs/manual/mod/mod_dbd.xml +++ b/docs/manual/mod/mod_dbd.xml @@ -54,6 +54,29 @@ supersedes the modules presented in that article.

+
Connecting + +

To connect to your database, you'll need to specify + a driver, and connection parameters. These vary from + one database engine to another. For example, to connect + to mysql, do the following:

+ + +DBDriver mysql +DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa + + +

You can then use this connection in a variety of other + modules, including mod_rewrite, + mod_authn_dbd, and mod_lua. + Further usage examples appear in each of those modules' + documentation.

+ +

See DBDParams for connection string + information for each of the supported database drivers.

+ +
+
Apache DBD API

mod_dbd exports five functions for other modules to use. The API is as follows:

-- 2.50.1