The mysql command itself can do that; see mysql(1). So; just use your select command on the command line, tell it not to use headers and redirect the output. Done.
Another, maybe easier, option is mysqldump. See mysqldump(1), it can export to csv on its own.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.