Centos – Can’t load driver file apr_dbd_thesql.so when restarting Apache

apache-2.2centosdatabasedriversMySQL

I have an Apache 2.2 version running on a Centos 7.1 machine running a LAMP stack (MySql version 5.6). Apache has been configured to enable the DBD modules, and running a DUMP_MODULES using httpd shows them as loaded.

When I try to stop the server I get the error:
DBD: Can't load driver file apr_dbd_mysql.so

I have tried to install various packages such as apr-util-mysql but that did not fix the error.

The specific file does exist in the /usr/lib64/apr-util-1/ directory.

Does anyone have any idea how I can debug or fix this?

Best Answer

You're so close. apr_dbd_mysql.so was created when you installed apr-util-mysql from yum. This is a shared module and provides apache with the driver required to communicate with mysql. Simply move apr_dbd_mysql.so into your apache modules directory ../apache2/modules/ and that should fix your bug.