-
-
Notifications
You must be signed in to change notification settings - Fork 3
sql database.8
sql-database - prepare data in MySQL for ctrlenv(8).
sql-database [-Sr] [-s dbserver -u user -p pass -d dbname -t table_name] filename
sql-database does a chdir to /etc/indimail/control and prepares filename.sql control file to enable ctrlenv to access data from MySQL instead of control files / cdb files. sql-database also prepares data in filename to be inserted into table_name in MySQL.
The below command will create a file dkimtable.sql in /etc/indimail/control and table dkimtable in MySQL
sql-database -s localhost -u indimail -p ssh-1.5- -d indimail -t dkimtable dkimtable
The below command will replace contents of file dkimtable in /etc/indimail/control into the the table dkimtable in MySQL.
sql-database -r dkimtable
-S
Skip creating MySQL table and subsequent inserting of data into MySQL
-r
Replace the content of data in MySQL with the content in filename
-u user
MySQL username. A user which has privilege to create, insert, delete in
MySQL database dbname.
-p pass
Password for MySQL user username
-d dbname
Database name in MySQL
-t table_name
Table in MySQL in which data from plain-text control file will be
inserted
ctrlenv(8), cdb-database(8), qmail-cdb(8), indimail-control(5),