- A CSV with all emails (both valid and invalid) – my_email_database.csv
- A list of invalid emails – invalid_emails_one_per_line.txt
grep -vwF -f invalid_emails_one_per_line.txt my_email_database.csv > final_list_without_invalid_emails.csv
This method is very efficient, I’ve tried it with very large data sets.
SELECT c.id, c.firstname, c.phone
FROM contact c
INTO OUTFILE '/full/path/destination/file.csv'
FIELDS TERMINATED BY ';'
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
Have you tried turning it off and on again?