Can't load driver file apr_dbd_mysql.so

myH2Oservers

Verified User
Joined
Mar 13, 2006
Messages
246
Location
Netherlands
I have to create a connection to a database within my apache config (rewritemap/rewritecond), therefore I am using:

DBDriver mysql
DBDParams "host=127.0.0.1 port=3306 user=username pass=password"
DBDParams "dbname=database_name"

However when I restart Apache it fails with error:
Can't load driver file apr_dbd_mysql.so

This apr_dbd_mysql.so is indeed not present on the system and should be originated from apr-utils. When I manually extract apr-utils from custombuild it finds the sources:

[root@web1 custombuild]# locate apr_dbd_mysql
/usr/local/directadmin/custombuild/apr-util-1.5.4/dbd/apr_dbd_mysql.c
/usr/local/directadmin/custombuild/apr-util-1.5.4/dbd/apr_dbd_mysql.dep
/usr/local/directadmin/custombuild/apr-util-1.5.4/dbd/apr_dbd_mysql.dsp
/usr/local/directadmin/custombuild/apr-util-1.5.4/dbd/apr_dbd_mysql.mak

However building Apache through custombuild does not add this apr_dbd_mysql.so to the system.
I analysed the custombuild "build" script but it only copies the content of apr-utils/apr to the srclib directory of apache before compiling apache.

How can I get apr_dbd_mysql.so available in Apache?
 
Hello,

Database Providers
------------------
As of apr-util version 1.2.11, MySQL DBD driver is shipped as part of the
distribution. However, to avoid licensing incompatibilities, it is not
built by default. To enable MySQL support, use the --with-mysql option,
but be aware that the MySQL license may introduce licensing implications
for your compiled code. Similarly, the bindings for propritary drivers
such as Oracle (--with-oracle option) must also be explicitly enabled.


...

/usr/local/directadmin/custombuild/apr-util-1.5.4/README


- Adding custom modules to apache for custombuild
http://help.directadmin.com/item.php?id=191


Code:
# locate apr_dbd_mysql
/usr/lib/apache/apr-util-1/apr_dbd_mysql-1.so
/usr/lib/apache/apr-util-1/apr_dbd_mysql.a
/usr/lib/apache/apr-util-1/apr_dbd_mysql.la
/usr/lib/apache/apr-util-1/apr_dbd_mysql.so
 
Back
Top