Nssync (split by section):   Section:   Chapter:FastBack: Nssync Configuration   Up: Nssync Configuration   FastForward: Invocation   Contents: Table of ContentsIndex: Concept Index

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.

Configuration: database name

Sets the database name.

Configuration: ssl-ca file

Defines the name of the Certificate Authority (CA) file.

There are two ways to supply database access credentials. The simplest one is by using user and password statements:

Configuration: user name

Sets SQL user name.

Configuration: password arg

Sets SQL user password.

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.

Configuration: sql-config-group name

Read the named group from the SQL configuration file.

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.

Nssync (split by section):   Section:   Chapter:FastBack: Nssync Configuration   Up: Nssync Configuration   FastForward: Invocation   Contents: Table of ContentsIndex: Concept Index