I found more than one post saying that to accomplish the task we have to run
SELECT * INTO OUTFILE 'file.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM table
If I run this as administrator I get
Error Code: 1227. Access denied; you need (at least one of) the FILE privilege(s) for this operation
To fix this we need to run
GRANT FILE ON *.* TO 'user'@'localhost';
where user is the admin user
If I do that I get
Error Code: 1045. Access denied for user 'user'@'%' (using password: YES)
And here I am stuck.
Note. I tried exporting the data with Workbench. The process starts and never stops. After waiting 15 hours I had to stop it. It seems that exporting large tables (like the one I want to export) with Workbench doesn't work.
Note. It seems that Azure MySQL doesn't support INTO OUTFILE command. But there is no indication on alternatives to export data to CSV
Can someone please advise on how to export a big table out of an Azure MySQL database into a CSV file?