ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv
Here, ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv
option so it cannot execute this statement on how to solve it.
You can store CSV file another location and MySQL store CSV file this location /var/lib/mysql-files/. Now check your server MySQL store file location run bellow command :
$ SELECT @@GLOBAL.secure_file_priv;

SELECT id, f_name, email INTO OUTFILE '/var/lib/mysql-files/export.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY ',' LINES TERMINATED BY '\n' FROM members;