GNU Info

Info Node: (mysql.info)Apache

(mysql.info)Apache


Prev: Twin Up: Tutorial
Enter node , (file) or (file)node

Using MySQL with Apache
=======================

The Contrib section includes programs that let you authenticate your
users from a MySQL database and also let you log your log files into a
MySQL table. Note: Contrib.

You can change the Apache logging format to be easily readable by MySQL
by putting the following into the Apache configuration file:

     LogFormat \
             "\"%h\",%{%Y%m%d%H%M%S}t,%>s,\"%b\",\"%{Content-Type}o\",  \
             \"%U\",\"%{Referer}i\",\"%{User-Agent}i\""

In MySQL you can do something like this:

     LOAD DATA INFILE '/local/access_log' INTO TABLE table_name
     FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'


automatically generated by info2www version 1.2.2.9