Forums

Export database table to excel

I wonder how to export table from database to excel file. Should I export it in bash or mysql console?

I used this query and got an error.

    select * from account INTO OUTFILE 'userInfo.csv' FIELDS ENCLOSED BY '"' 
        -> TERMINATED BY ';';
    ERROR 1045 (28000): Access denied for user 'sunyk'@'%' (using password: YES)

And in bash

Access denied for user 'sunyk'@'10.0.0.64' (using password: YES) when trying to connect

what command did you run? (eg: were you connecting to the correct database table?)