help with bind

Agnello George agnello.dsouza at gmail.com
Mon Nov 12 12:17:35 UTC 2007


>
>
> 1: Adam didn't tell OP that his is the only 9.4.1-P1 srpm available for
> Red Hat-derived systems, nor where to find it:
> http://people.redhat.com/atkac/bind/;
>
> 2: If OP doesn't know what an srpm is, what to do with it (including
> modifying the spec file) then he has a serious problem which is beyond the
> scope of this list.


HI Again !!

I  have fianlly installed the source rpm package thanks for the link.


[root at bind i386]# rpm -qa |grep bind
bind-libs-9.5.0-16.3.a6.fc7
bind-devel-9.5.0-16.3.a6.fc7
bind-9.5.0-16.3.a6.fc7
bind-debuginfo-9.5.0-16.3.a6.fc7
bind-utils-9.5.0-16.3.a6.fc7
bind-chroot-9.5.0-16.3.a6.fc7
[root at bind i386]#

In the named.conf i have added the following lines :
( do i need to comment out the rest of the text )

dlz "Mysql zone" {
   database "mysql
   {host=localhost dbname=binddlzdb user=binddlzuser pass=binddlzpassword}
   {select zone from dns_records where zone = '%zone%'}
   {select ttl, type, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"')
        else data end from dns_records where zone = '%zone%' and host =
'%record%'
        and not (type = 'SOA' or type = 'NS')}
   {select ttl, type, mx_priority, data, resp_person, serial, refresh,
retry, expire, minimum
        from dns_records where zone = '%zone%' and (type = 'SOA' or
type='NS')}
   {select ttl, type, host, mx_priority, data, resp_person, serial, refresh,
retry, expire,
        minimum from dns_records where zone = '%zone%' and not (type = 'SOA'
or type = 'NS')}
   {select zone from xfr_table where zone = '%zone%' and client =
'%client%'}
   {update data_count set count = count + 1 where zone ='%zone%'}";
};



##############################################################

Here is the steps i followed to create the database layout :

mysqladmin -u root password password_passwd

mysqladmin -u root -p create binddlzdb

Change to the MySQL database administration and add the bind-dlz user and
password:

USE mysql;
INSERT INTO user (Host, User, Password) VALUES
('localhost','binddlzuser',password('binddlzpassword'));
INSERT INTO db (Host, Db, User, Select_priv) VALUES
('localhost','binddlzdb','binddlzuser','Y');

Setup the rights for the just created users:

FLUSH PRIVILEGES;
GRANT USAGE ON binddlzdb.* TO binddlzuser at localhost;
GRANT SELECT, INSERT, DELETE, UPDATE ON binddlzdb.* TO binddlzuser at localhost
;

Following is the table layout

CREATE TABLE `records` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `zone` varchar(255) NOT NULL,
  `ttl` int(11) NOT NULL default '86400',
  `type` varchar(255) NOT NULL,
  `host` varchar(255) NOT NULL default '@',
  `mx_priority` int(11) default NULL,
  `data` text,
  `primary_ns` varchar(255) default NULL,
  `resp_contact` varchar(255) default NULL,
  `serial` bigint(20) default NULL,
  `refresh` int(11) default NULL,
  `retry` int(11) default NULL,
  `expire` int(11) default NULL,
  `minimum` int(11) default NULL,
  PRIMARY KEY  (`id`),
  KEY `type` (`type`),
  KEY `host` (`host`),
  KEY `zone` (`zone`)
);

CREATE TABLE `xfr` (
  `zone` varchar(255) NOT NULL,
  `client` varchar(255) NOT NULL,
  KEY `zone` (`zone`),
  KEY `client` (`client`)
);

quit;

But now  if i try to start named it fails and i get  the following error
logs :  ( /var/log/messages )

[root at bind i386]# tail -f /var/log/messages
Nov 12 22:59:06 bind named[25300]: SDB directory DB zone database module
loaded.
Nov 12 22:59:06 bind named[25300]: loading configuration from
'/etc/named.conf'
Nov 12 22:59:06 bind named[25300]: listening on IPv6 interface lo, ::1#53
Nov 12 22:59:06 bind named[25300]: listening on IPv4 interface lo,
127.0.0.1#53
Nov 12 22:59:06 bind named[25300]: Loading 'Mysql zone' using driver mysql
Nov 12 22:59:06 bind named[25300]: mysql driver failed to create database
connection after 4 attempts
Nov 12 22:59:06 bind named[25300]: SDLZ driver failed to load.
Nov 12 22:59:06 bind named[25300]: DLZ driver failed to load.
Nov 12 22:59:06 bind named[25300]: loading configuration: failure
Nov 12 22:59:06 bind named[25300]: exiting (due to fatal error)

###################################################################
 Can some one tell me what need to be done here ... am i on track ? or
totally off track ?

Thanks again :-)


-- 
>
> Agnello . G .Dsouza




More information about the bind-users mailing list