Howtoforge published a guide about logging a MySQL database with mod_log_sql
This guide shows how you can write the Apache2 access log to a MySQL database instead of a file. To achieve this, I use the Apache2 module mod_log_sql. I am using a Debian Etch server in this tutorial.Apache2: Logging To A MySQL Database With mod_log_sql (Debian Etch)