如何将mysql表数据导出到文件

时间:2018-06-07 20:02:29

标签: mysql select

我正在尝试将数据从表导出到excel文件。

我正在使用select ... INTO ...文件方法来执行此操作。我收到了错误

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

以下查询的输出为NULL。

SHOW VARIABLES LIKE "secure_file_priv";

在下面的帖子中,staza通过添加LOCAL>解决了这个问题。但他们的问题是在将msv导入MySQL时,我的是从MySQL导出到csv。有没有" LOCAL"相当于出口问题?

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

提前致谢!!

1 个答案:

答案 0 :(得分:0)

当您运行MySQL -secure-file-priv时,您只能从上传目录读取和写入文件。

在Windows下,这通常位于

之下
C:\programdata\
相关问题