我将 MySQL 表写入输出文件(在 Unix 上工作),但无法进入文件目录(权限被拒绝)

发布于 2024-09-29 04:55:36 字数 109 浏览 0 评论 0原文

当我将整个表输出到名为“Arshan.txt”的输出文件中时,此命令运行良好,但我无法访问创建的输出文件。当我访问 /usr/local/mysql/data 时,它说权限被拒绝。 任何帮助将不胜感激。

When I output a whole table into an output file named 'Arshan.txt' this command works well but I can not access the output file created. When I access /usr/local/mysql/data it says permission denied.
Any help will be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流心雨 2024-10-06 04:55:36

您需要使用运行 MySQL 进程的同一帐户来访问该文件。如果您是计算机的管理员,您还可以使用 sudo 以超级用户权限执行任何命令。例如:

sudo cp /usr/local/mysql/data/Arshan.txt ~foo/Arshan.txt
sudo chown foo ~foo/Arshan.txt

You'll need to access the file using the same account the MySQL process is running under. If you're an administrator on the machine you can also use sudo to execute any command with superuser privileges. For example:

sudo cp /usr/local/mysql/data/Arshan.txt ~foo/Arshan.txt
sudo chown foo ~foo/Arshan.txt
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文