**Using:** MySQL Workbench

I am trying to write in to my MySQL Query to have the file automatically save using the current date (orders\_20150214.csv), however even the basic save(no date) is not working, I keep getting a server refusal.

Code:

```
USE `databasename`;
Select   -- complex query from multiple tables -- 
-- Get Order data --

INTO OUTFILE 'E:\My Documents\2014-2015 Accs\ccccc\orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'

```

Error:

```
Error Code: 1045. Access denied for user 'dddddd'@'%.dddddddd' (using password: YES)  

```

I have also tried a number of variations of the above 

```
USE `databasename`;
Select   -- complex query from multiple tables -- 
-- Get Order data --
FROM table_name  -- multiple tables --
INTO OUTFILE 'E:\My Documents\2014-2015 Accs\ccccc\orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'  

```

I know MySQL Workbench has an inbuilt "save as" and I use it, however there are days where I want to run the query, and it autosaves. I have a macro that retrieves data from .csv files and compiles to a running order book, I'd like to automate it further. 

I have also tried:

```
INTO OUTFILE 'E:\\My Documents\\2014-2015 Accs\\dddd\\orders.csv'
INTO OUTFILE 'E:/My Documents/2014-2015 Accs/dddd/orders.csv'
-- http://dev.mysql.com/doc/refman/5.1/en/select-into.html

```

I've read mixed messages as to whether I can do this programmatically to save on my local machine. So it may not be possible directly through MySQL Workbench.

Please help :)