MySQL writing on a text file

老子叫甜甜 提交于 2019-12-10 11:28:52

问题


I'm trying to write data on a text file on MySQL workbench 5.2.45 in a Macbook Pro with Mountain Lion OS 10.8.2; and I get the following mistake:

"Error Code: 1. Can't create/write to file '/Users/JohnnyDahdah/Desktop/datos2' (Errcode: 13 - Permission denied) 0.001 sec"

My code is the following:

select * from Datos into outfile '/Users/JohnnyDahdah/Desktop/datos2.txt';

回答1:


Unless the server is running as you then it does not have permission to write into your home directory. You could probably arrange for you and it to share a group, but it's probably better to get it to write to /tmp and avoid the whole issue.



来源:https://stackoverflow.com/questions/14690803/mysql-writing-on-a-text-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!