Koozali.org: home of the SME Server

mysql Select INTO OUTFILE error 13

Offline Smallbox

  • 16
  • +0/-0
mysql Select INTO OUTFILE error 13
« on: January 20, 2017, 12:23:30 PM »
After update my SME Server I have Error in mysql

I want create sql dump table va_header_links from my base to user directory and use follow command

SELECT * INTO OUTFILE '/home/e-smith/files/users/admin/home/tmp/va_header_links_2017012114582.sql' FROM va_header_links

and have error

Can't create/write to file '/home/e-smith/files/users/admin/home/tmp/va_header_links_2017012114582.sql' (Errcode: 13)

I get permission for mysql user and this is dont help. But than I create this dump to \tmp directory I dont have error.
Please help.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: mysql Select INTO OUTFILE error 13
« Reply #1 on: January 20, 2017, 12:28:24 PM »
your script should use another dir as target (you'd create a /var/lig/mysql-files owned by mysql:mysql) then move the file elsewhere

mysql can't traverse /home/e-smith/files/ dir AFAIK

Offline Smallbox

  • 16
  • +0/-0
Re: mysql Select INTO OUTFILE error 13
« Reply #2 on: January 20, 2017, 01:07:10 PM »
your script should use another dir as target (you'd create a /var/lig/mysql-files owned by mysql:mysql) then move the file elsewhere

mysql can't traverse /home/e-smith/files/ dir AFAIK

May be I can use secure-file-priv key in my.cfg to get this access?

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: mysql Select INTO OUTFILE error 13
« Reply #3 on: January 20, 2017, 01:37:04 PM »
please, don't poke with your server..

explain your problem, not your solution, thank you

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: mysql Select INTO OUTFILE error 13
« Reply #4 on: January 23, 2017, 11:00:06 AM »
did you solve your issue?