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 ...
当前正在显示可能无法访问的结果。
隐藏无法访问的结果当前正在显示可能无法访问的结果。
隐藏无法访问的结果