PowerDNS export from MySQL to csv using command line
Let's start, set a directory for csv-file
sudo mkdir /tmp/mysql sudo chown -R mysql:mysql /tmp/mysql/
This eliminates an error message such as "ERROR 1 (HY000): Can't create/write to file '/home/exsample_domainparkki_com.csv' (Errcode: 13 "Permission denied")"
1. Run the following command on the mysql command line
SELECT * FROM domains INTO OUTFILE '/tmp/mysql/exsample_domainparkki_com.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
2. Using mysqldump
mysqldump -u [username] -p -t -T/path/to/directory [database] [tableName] --fields-terminated-by=,
Domainparkki may be able to help if you need plain name server services for hobby/low volume use. Only 5 euros +VAT per zone per year. One zone = one domain, including 20 records per zone and 1 billion queries per month (excess traffic is billed separately). Open the link above and check it out. Inquiries by email firstname.lastname@example.org.
// viHannes, 7 Jun 2022 in Helsinki, Finland