Search code examples
mysqlbasic-authenticationdbd

DBD: Can't load driver file apr_dbd_mysql.so with HTTP basic Auth usind MySql DB


After I decided to move from file based to DB based auth, I got this error while restarting my apache:

DBD: Can't load driver file apr_dbd_mysql.so [Failed]


Any reason why is this happening?
I browsed internet and at many places it was written that the dependent package has now been deprecated and cannot install libapache2-mod-auth-mysql package. I am using Amazon Linux.


Solution

  • Probably installed Apache Portable Runtime (APR) does not include MySQL support. You need to rebuild it with option "MySQL Database Support".

    For FreeBSD:

    cd /usr/ports/devel/apr1
    make config
    

    Check "MySQL Database Support" and

    make reinstall clean