1
votes

Edit More information:

I'm trying to run a MySQL query via an event in phpMyAdmin and I'm getting the error above. More specifically, I'm getting this error:

[ERROR] Event Scheduler: [root@localhost][ally.send_stories] Can't create/write to file '\xampp\tmp\stories.csv' (Errcode: 2)

Here is a dumbed down query. The actual one uses joins

begin
select * into outfile '/xampp/tmp/stories.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '/n' from my_table where date_added between date_sub(now(), interval 7 day) and now();
end

I've looked into this and from what I can tell, it's due to not having write permissions to the director. The trouble is, I'm not exactly sure how to give mysql write access to the director it needs.

Currently I'm just using the default root@localhost

Edit I'm Running this as an Event in phpMyAdmin - locally (currently)

1
Please give the config.php file where you are connecting to the db. - Amit
@AmitKumar Sorry - I should have mentioned that I'm running this as an event from phpMyAdmin. Unless you mean a different config file. - gin93r
Which action are you trying to execute exactly ? - Hidden
Did you tried another path? - Hidden
@Polymorphin while I haven't solved the problem of writing to a directory, your reply did lead me being to save the file to the default location. If you'd like credit, feel free to create a post that I can mark as the answer. - gin93r

1 Answers

0
votes

Just try another path it should solve your problem.