--secure-file-priv选项,因此它无法在Mac上执行此语句

时间:2019-05-30 13:19:26

标签: mysql sql-server

我正在尝试从Mac上的终端使用mysql将数据库导出到csv文件中。 已从brew install安装了Mysql,版本是8.0.16。

以下我报告了代码和错误:

mysql> select *
-> from myTable
-> into OUTFILE 'Table.csv'
-> FIELDS TERMINATED BY ','
-> ENCLOSED BY '"'
-> LINES TERMINATED BY '\n';   

ERROR 1290 (HY000): The MySQL server is running with the --secure-file- 
priv option so it cannot execute this statement

mysql> show variables like "secure_file_priv";
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| secure_file_priv | NULL  |
+------------------+-------+
1 row in set (0,01 sec)

0 个答案:

没有答案