How can I have MySQL write outfiles as a different user?

后端 未结 4 1514
Happy的楠姐
Happy的楠姐 2021-02-07 20:46

I\'m working with a MySQL query that writes into an outfile. I run this query once every day or two and so I want to be able to remove the outfile without having to resort to s

4条回答
  •  执笔经年
    2021-02-07 21:21

    I just do

    sudo gedit /etc/apparmor.d/usr.sbin.mysqld
    

    and add

     /var/www/codeigniter/assets/download/* w,
    

    and

    sudo service mysql restart
    

    And that's it, I can do easily SELECT INTO OUTFILE any filename

提交回复
热议问题