CSV
mysql -uusername -ppassword -e "SELECT * from tablename" dbname | sed 's/\t/","/g;s/^/"/;s/$/"/' > /path/to/file/filename.csv
HTML
mysql -H -uusername -ppassword -e "select domain_moid ,user_moid,user,time from tablename limit 10" dbname > /path/to/file/filename.html
XML
mysql -X -uusername -ppassword -e "select domain_moid ,user_moid,user,time from tablename limit 10" dbname > /path/to/file/filename.xml