Howtoforge shows you how to password-protect directories with mod_auth_mysql
This guide explains how to password-protect web directories (with users from a MySQL database) with mod_auth_mysql on Apache2 on a Debian Squeeze server. It is an alternative to the plain-text password files provided by mod_auth and allows you to use normal SQL syntax to create/modify delete users. You can also configure mod_auth_mysql to authenticate against an existing MySQL user table.How To Password-Protect Directories With mod_auth_mysql On Apache2 (Debian Squeeze)