USE <database_name>; SELECT * INTO OUTFILE "<file_name.csv>" FIELD TERMINATED BY ',' FROM <table_name>;