Bind with mysql backend
Mike Ragusa
mragusa at gmail.com
Tue Mar 4 16:25:26 UTC 2008
I have been using the default schema with bind-dlz and mysql as noted on
their website. I was wondering what people use to manage this information
and if they used another database schema that offered better performance or
ablity to manage the data better.
Default Schema:
+-------------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------+------+-----+---------+-------+
| zone | text | YES | MUL | NULL | |
| host | text | YES | MUL | NULL | |
| type | text | YES | MUL | NULL | |
| data | text | YES | | NULL | |
| ttl | int(11) | NO | | 3600 | |
| mx_priority | text | YES | | NULL | |
| refresh | int(11) | YES | | NULL | |
| retry | int(11) | YES | | NULL | |
| expire | int(11) | YES | | NULL | |
| minimum | int(11) | YES | | NULL | |
| serial | bigint(20) | YES | | NULL | |
| resp_person | text | YES | | NULL | |
| primary_ns | text | YES | | NULL | |
+-------------+------------+------+-----+---------+-------+
Default MySQL for named.conf:
dlz "Mysql zone" {
database "mysql
{host=localhost dbname=dns user=dns pass=bind-dlz-test}
{select zone from dns_records where zone = '%zone%'}
{select ttl, type, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"')
when lower(type) = 'soa' then concat_ws(' ', data, resp_person,
serial, refresh, retry, expire, minimum)
else data end from dns_records where zone = '%zone%' and host =
'%record%'}
{}
{select ttl, type, host, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"') else data end, resp_person, serial,
refresh, retry, expire,
minimum from dns_records where zone = '%zone%'}
{select zone from xfr_table where zone = '%zone%' and client =
'%client%'}";
};
More information about the bind-users
mailing list