mysql> show create table soa\G;
CREATE TABLE `soa` ( `id` int(10) unsigned NOT NULL auto_increment, `origin` char(255) default NULL, `ns` char(255) default NULL, `mbox` char(255) default NULL, `serial` int(10) unsigned default '1', `refresh` int(10) unsigned default '28800', `retry` int(10) unsigned default '7200', `expire` int(10) unsigned default '604800', `minimum` int(10) unsigned default '86400', `ttl` int(10) unsigned default '86400', `xfer` char(255) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `origin` (`origin`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=gbk;
mysql> show create table rr\G;
*************************** 1. row ***************************
Table: rr
CREATE TABLE `rr` ( `id` int(10) unsigned NOT NULL auto_increment, `zone` int(10) unsigned NOT NULL, `name` char(64) default NULL, `type` enum('A','AAAA','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL, `data` char(128) default NULL, `aux` int(10) unsigned NOT NULL, `ttl` int(10) unsigned NOT NULL default '600', `inter` tinyint(3) unsigned NOT NULL default '1', `intra` tinyint(3) unsigned NOT NULL default '1', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `rr` (`zone`,`name`,`type`,`data`) ) ENGINE=MyISAM AUTO_INCREMENT=1437896 DEFAULT CHARSET=gbk;
mysql> select * from soa where id=3;
+----+--------------+--------------+---------------------+--------+---------+-------+--------+---------+-------+------+
| id | origin | ns | mbox | serial | refresh | retry | expire | minimum | ttl | xfer |
+----+--------------+--------------+---------------------+--------+---------+-------+--------+---------+-------+------+
| 3 | example.com. | ns.example.com. | julyclyde.gmail.com | 1 | 28800 | 7200 | 604800 | 86400 | 86400 | NULL |
mysql> select * from rr where id=1;
+----+------+------+------+----------------+-----+-----+-------+-------+
| id | zone | name | type | data | aux | ttl | inter | intra |
+----+------+------+------+----------------+-----+-----+-------+-------+
| 1 | 1 | www | A | 1.1.1.1 | 0 | 1 | 1 | 1 |
cat /etc/mydns.conf
db-host = localhost
db-user = yourdbname
db-password = yourpassword
database = dns
user = nobody
group = nobody
listen = *
no-listen =
zone-cache-size = 1024
zone-cache-expire = 60
reply-cache-size = 1024
reply-cache-expire = 30
log = /var/log/mydns.log
pidfile = /var/run/mydns.pid
timeout = 120
multicpu = 4
servers = 2
recursive = 8.8.8.8
recursive-timeout =
recursive-retries =
recursive-algorithm =
allow-axfr = no
allow-tcp = no
allow-update = no
ignore-minimum = no
soa-table = soa
rr-table = rr
use-soa-active = no
use-rr-active = no
notify-enabled = no
notify-source = 0.0.0.0
notify-source6 = 0.0.0.0
notify-timeout = 60
notify-retries = 5
notify-algorithm = linear
ixfr-enabled = no
ixfr-gc-enabled = no
ixfr-gc-interval = 86400
ixfr-gc-delay = 600
extended-data-support = no
dbengine = MyISAM
wildcard-recursion = 0
soa-where =
rr-where = inter=1