![]() | Warning |
---|---|
This backend is deprecated! Use the Generic MySQL backend which is better in all respects. It does support master/slave operation, this backend does not. See Section 5, “Generic MySQL and PgSQL backends”. So stop reading here unless you already have a database filled with 'mysql' records. |
Table A.2. MySQL backend capabilities
Native | Yes |
Master | No |
Slave | Yes |
Superslave | No |
Autoserial | Yes |
Case | Insensitive |
DNSSEC | No (but see Generic backend!) |
Module name | mysql |
Launch name | mysql |
The MySQL Backend as present in PDNS is fixed - it requires a certain database schema to function. This schema corresponds to this create statement:
CREATE TABLE records ( id int(11) NOT NULL auto_increment, domain_id int(11) NOT NULL, name varchar(255) NOT NULL, type varchar(10) NOT NULL, content varchar(255) NOT NULL, ttl int(11) NOT NULL, prio int(11) default NULL, change_date int(11) default NULL, PRIMARY KEY (id), KEY name_index(name), KEY nametype_index(name,type), KEY domainid_index(domain_id) );
Every domain should have a unique domain_id, which should remain identical for all records in a domain. Records with a domain_id that differs from that in the domain SOA record will not appear in a zone transfer.
The change_date may optionally be updated to the time_t (the number of seconds since midnight UTC at the start of 1970), and is in that case used to auto calculate the SOA serial number in case that is unspecified.
WARNING! Make sure that you can actually resolve the hostname of your database without accessing the database! It is advised to supply an IP address here to prevent chicken/egg problems!
Database name to connect to
Database host to connect to
Password to connect with
MySQL socket to use for connecting
MySQL table name. Defaults to 'records'.
MySQL user to connect as