The SQL database is configured using the following options:
Set the name of the MySQL configuration file to read. By default /etc/my.cnf is used.
Set the name of the group in the MySQL configuration file, from where to read the configuration options.
The statements above allow to keep all security-sensitive information, such as MySQL username and password, in an external configuration file and thus to relax permission requirements for smapd.conf. For a detailed description of the format of such external configuration file (or option file in ‘MySQL’ parlance), see MySQL option files.
In case the use of option files is not feasible for some reason,
you may specify MySQL connection and database parameters in
smapd.conf when loading the
mysql module or defining
a smap database. The following options are used to define MySQL
Sets the hostname or IP address of the host running the MySQL server.
Sets port number the MySQL server is listening on. Default is 3306.
Sets the socket name, if the server is listening on a UNIX socket.
Sets the pathname to the certificate authority file, if you wish to use a secure connection to the server via SSL.
Notice, that either host and, optionally, port or socket must be used. Specifying both is senseless.
MySQL database and user credentials are defined using the following options:
Sets the name of the MySQL database to use.
Sets MySQL user name.
Sets the password for accessing the MySQL database.
When using these options, it is reasonable to tighten the permissions on smapd.conf so that no third person could see the MySQL password. The recommended permissions are ‘0600’.