0

I am trying to export data from a table to excel file.

I am using the select ... INTO ... file method to do so. I am getting the error

Error Code: 1290 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

The output of below query is NULL.

SHOW VARIABLES LIKE "secure_file_priv";

In the post below, staza resolved the issue by adding LOCAL> But their issue was while working with importing csv to MySQL while mine is exporting from MySQL to csv. Is there any "LOCAL" equivalent for the export issue?

How should I tackle --secure-file-priv in MySQL?

Thanks in advance!!

Codegak
  • 1
  • 1

1 Answers1

0

When you are running MySQL -secure-file-priv you can read and write files only from and to the upload directory.

Under Windows this typically is somewhere under

C:\programdata\
Xypron
  • 2,215
  • 1
  • 12
  • 24
  • I am on mac. Would you know the equivalent path. Even then, if the value is set to NULL, would it let you download to that path? – Codegak Jun 08 '18 at 15:45