You can use mysql dump or query to extract data to csv file
SELECT *
INTO OUTFILE '/tmp/products.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM products
Please note that mysql is the user writing /`tmp/products.csv'. When you use this file, you'll need to copy it into your own working directory, so the file acquires your privileges.
Depending on your version of MySQL, you might not be able to run this command again without first removing the file. The reason for this is you might get an error saying the file already exists. Therefore, you might have to become root to remove the file from '/tmp', before running the command a second time.