Koozali.org formerly Contribs.org

mysql Select INTO OUTFILE error 13

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,779
  • Skype account: maghissimo
    • Smeserver italian community
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
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

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,779
  • Skype account: maghissimo
    • Smeserver italian community
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
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: mysql Select INTO OUTFILE error 13
« Reply #4 on: January 23, 2017, 11:00:06 AM »
did you solve your issue?
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia