NSSYNC |
|
DNS Zone Files Maintenance Utility |
Sergey Poznyakoff |
4.2 SQL Access
The following statements define the database server and the database to use:
- Configuration: host hostname[:port-or-socket]
Defines the SQL server IP and port. The hostname can be either the server IP address or its hostname. The port-or-socket part, if supplied, can be either the number of TCP port to use instead of the default 3306 or the full pathname of the UNIX socket. In the latter case hostname is effectively ignored.
There are two ways to supply database access credentials. The
simplest one is by using user
and password
statements:
The drawback of this approach is that the password appears in plaintext, which means the permissions of the nssync.conf file must be tightened so as to avoid its compromise.
The following two statements provide an alternative, more safe and flexible way of setting access credentials:
- Configuration: sql-config-file file
Read MySQL configuration from the option file file. See option files, for a description of MySQL option file format.
To illustrate their use, suppose your nssync.conf file contains the following:
sql-config-file /etc/nssync.my; sql-config-group nssync;
The the /etc/nssync.my will contain the actual SQL access configuration, which can look as in the example below:
[nssync] socket = /var/db/mysql.sock database = dns user = root pass = guessme
- Configuration: slave-status-file file
Use this statement if
nssync
reads data from a slave database. It allows you to avoid recreating zone files if the database information has not changed since the previous run.If this statement is present,
nssync
will save the state of the SQL slave in file. Upon startup, it will read these data and compare them with the current state. If they are the same, it will exit immediately.
This document was generated on April 24, 2015 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.