Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create/write to file 'xxxx.txt' (Errcode: 13 - Permission denied)

Tags:

mysql

macos

mysql> \T abc.txt
./mysql: Can't create/write to file 'abc.txt' (Errcode: 13 - Permission denied)
Error logging to file 'logPremiereQueries.txt'

I meet the same problem when I use Windows 8. I solve it by running cmd (MySQL 5.6 Command Line Client) as administrator. And then I could easily find the position of abc.txt. However, in Mac OS X, I do not know how to change the permission. And if log to file successfully, where to find this 'abc.txt'? Any ideas? Thank you very much!

like image 719
Jason Avatar asked Dec 07 '13 21:12

Jason


1 Answers

Just leaving this here for the future...

If you are using Windows, open services. Right click on mysql service, select properties. In the properties window select Log On tab then Log on as: Local System account.

If you are ready, restart the service and you can select into outfile anywhere where you have permission to write.

like image 151
Gergő Czuczor Avatar answered Nov 15 '22 07:11

Gergő Czuczor