3.8. Using MySQL with Apache
There are programs that let you authenticate your users from a
MySQL database and also let you write your log files into a MySQL
You can change the Apache logging format to be easily readable by
MySQL by putting the following into the Apache configuration file:
To load a log file in that format into MySQL, you can use a
statement something like this:
LOAD DATA INFILE '
/local/access_log' INTO TABLE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
The named table should be created to have columns that correspond
to those that the
LogFormat line writes to the