mysql and BIND 9.4.2

Chris Hastie lists at oak-wood.co.uk
Mon Aug 11 22:15:30 UTC 2008


On 11/08/08 19:17, Johnson, James wrote:
> Does any know how to make mysql and BIND work together.
>
>  
>   

Configure bind with --with-dlz-mysql. I seem to recall that using
--disable-threads is also recommended with MySql. Lots of info at
http://bind-dlz.sourceforge.net/

There is an issue with bind giving up if the MySQL server goes away,
which is helped by this patch:

--- contrib/dlz/drivers/dlz_mysql_driver.c.orig 2007-11-15
09:08:05.000000000 +0000
+++ contrib/dlz/drivers/dlz_mysql_driver.c      2007-11-15
09:10:49.000000000 +0000
@@ -923,6 +923,13 @@
        pass = getParameterValue(argv[1], "pass=");
        socket = getParameterValue(argv[1], "socket=");

+        if(mysql_options((MYSQL *) dbi->dbconn, MYSQL_OPT_RECONNECT,"1")) {
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+                             "Could not set database reconnect option");
+        }
+
+
        for (j=0; dbc == NULL && j < 4; j++)
                dbc = mysql_real_connect((MYSQL *) dbi->dbconn, host,
                                         user, pass, dbname, port, socket,


-- Chris Hastie Find tree care advice at http://www.tree-care.info/



More information about the freebsd-questions mailing list