thanks for the responses, It was the fact that the user i was connecting as didnt have write permissions. That cant be changed so I just have a cron job execute the query write it into a file that ...
Don't be afraid of using your chosen database's command-line client. I might as well say this up front: I don't like using GUI (aka non-command-line or graphical) tools with my databases. This is ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results