Skip to content

sql database.8

Manvendra Bhangui edited this page Sep 4, 2022 · 4 revisions

NAME

cdb-database - prepare data in MySQL for ctrlenv(8).

SYNOPSIS

cdb-database [-Sr] [-s dbserver -u user -p pass -d dbname -t table_name] filename

DESCRIPTION

cdb-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. cdb-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

 cdb-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.

 cdb-database -r dkimtable

OPTIONS

-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

SEE ALSO

ctrlenv(8), cdb-database(8), qmail-cdb(8), qmail-control(5),

Clone this wiki locally