SELECT INTO OUTFILE无法写入文件 [英] SELECT INTO OUTFILE can't write to file

查看:1088
本文介绍了SELECT INTO OUTFILE无法写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行SELECT INTO OUTFILE,并且出现以下错误:

I'm trying to do a SELECT INTO OUTFILE and I'm getting the following error:

General error: 1 Can't create/write to file '/home/jason/projects/mcif/web/downloads/dump.csv' (Errcode: 13). Failing Query: "
SELECT name
INTO OUTFILE '/home/jason/projects/mcif/web/downloads/dump.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
FROM account a

我知道问题可能出在哪里:我的MySQL用户无法写入我的downloads文件夹.我不知道如何解决此问题,原因有两个:

I know what the problem probably is: my downloads folder isn't writable by my MySQL user. I don't know how to solve this problem for two reasons:

  • 我不知道如何找出 MySQL用户是
  • 我不知道如何将MySQL用户添加到能够写入downloads文件夹的用户
  • I don't know how to find out what the MySQL user is
  • I don't know how to add the MySQL user to the users who are able to write to the downloads folder

我在Ubuntu Linux上.有人可以帮我克服这两件事吗?

I'm on Ubuntu Linux. Can someone help me get past those two things?

推荐答案

编写文件/tmp/dump.csv并将其复制过来.这将使您看到谁在运行什么.我的猜测是您正在通过Web执行此操作,并且客户端正在作为Web服务器进程运行...

write the file /tmp/dump.csv and the copy it over.. That will let you see who is running what. My guess is that you are doing this from the web and the client is running as the web server process...

这篇关于SELECT INTO OUTFILE无法写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆