]> granicus.if.org Git - apache/commitdiff
Add a section with an example of connecting to mysql. Because I can
authorRich Bowen <rbowen@apache.org>
Sat, 10 Sep 2016 14:53:04 +0000 (14:53 +0000)
committerRich Bowen <rbowen@apache.org>
Sat, 10 Sep 2016 14:53:04 +0000 (14:53 +0000)
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
docs/manual/mod/mod_dbd.xml

index 4303fd95aecad6eab8eb316e108f9cfeda193727..52b96916751edecf130f5ad2eda996464ab60cd7 100644 (file)
@@ -48,6 +48,7 @@
 <div id="quickview"><h3>Topics</h3>
 <ul id="topics">
 <li><img alt="" src="../images/down.gif" /> <a href="#pooling">Connection Pooling</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#connecting">Connecting</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#API">Apache DBD API</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#prepared">SQL Prepared Statements</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#security">SECURITY WARNING</a></li>
     supersedes the modules presented in that article.</p>
 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
+<h2><a name="connecting" id="connecting">Connecting</a></h2>
+
+    <p>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:</p>
+
+<pre class="prettyprint lang-config">DBDriver mysql
+DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa</pre>
+
+
+    <p>You can then use this connection in a variety of other
+    modules, including <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>,
+    <code class="module"><a href="../mod/mod_authn_dbd.html">mod_authn_dbd</a></code>, and <code class="module"><a href="../mod/mod_lua.html">mod_lua</a></code>.
+    Further usage examples appear in each of those modules'
+    documentation.</p>
+
+    <p>See <code class="directive">DBDParams</code> for connection string
+    information for each of the supported database drivers.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
 <h2><a name="API" id="API">Apache DBD API</a></h2>
     <p><code class="module"><a href="../mod/mod_dbd.html">mod_dbd</a></code> exports five functions for other modules
     to use. The API is as follows:</p>
index 5c6e605fdcf860f97f6d587436bf9d938dda5f1e..227ab8e63be4c4bb0ed563dcae4a3626691d751c 100644 (file)
     supersedes the modules presented in that article.</p>
 </section>
 
+<section id="connecting"><title>Connecting</title>
+
+    <p>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:</p>
+
+<highlight language="config">
+DBDriver mysql
+DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa
+</highlight>
+
+    <p>You can then use this connection in a variety of other
+    modules, including <module>mod_rewrite</module>,
+    <module>mod_authn_dbd</module>, and <module>mod_lua</module>.
+    Further usage examples appear in each of those modules'
+    documentation.</p>
+
+    <p>See <directive>DBDParams</directive> for connection string
+    information for each of the supported database drivers.</p>
+
+</section>
+
 <section id="API"><title>Apache DBD API</title>
     <p><module>mod_dbd</module> exports five functions for other modules
     to use. The API is as follows:</p>