mysql export table to csv with column names code example Example: export mysql table to file mysqldump db_name tbl_name;