# Can I use OUTFILE in Managed MySQL?

Yes it's possible on Elestio. Since we are running MySQL inside a docker container you will have to modify the stack to mount a new volume in the docker-compose. You can edit it with UPDATE CONFIG button from our dashboard  
  
You will have to add a line like this in the mysql container  
\- ./files:/var/lib/mysql-files

[![image.png](https://docs.elest.io/uploads/images/gallery/2023-04/scaled-1680-/image.png)](https://docs.elest.io/uploads/images/gallery/2023-04/image.png)

Then click on the button "Apply &amp; restart"  
  
After that you can use queries like this:

```sql
SELECT * FROM `help_topic` INTO OUTFILE '/var/lib/mysql-files/test1.csv';
```

and your file test1.csv will be present on the host vm in /opt/app/files/test1.csv

You can access it over SSH / SFTP / File Explorer / VS Code ...

If you want to use InFile to import CSV to a Table, you must add another option at end of row 6 (command) of the docker-compose file:

<div id="bkmrk---local-infile%3D1"><div>--local-infile=1</div></div><div id="bkmrk--1"></div><div id="bkmrk--2"></div><div id="bkmrk-then-also-modify-the">Then also modify the mysql-docker-cli.sh to add "--local-infile" at the end of it</div><div id="bkmrk-finally-you-can-star">Finally you can start the cli with: </div><div id="bkmrk--3"></div><div id="bkmrk-.%2Fopt%2Fapp%2Fmysql-dock">./opt/app/mysql-docker-cli.sh;</div><div id="bkmrk--4"></div><div id="bkmrk-from-there-you-can-n">from there you can now load data from CSV with a query like this:</div><div id="bkmrk--5"></div><div id="bkmrk-use-your_db_name_her">use YOUR_DB_NAME_HERE;</div><div id="bkmrk-load-data-local-infi">LOAD DATA LOCAL INFILE '/var/lib/mysql-files/**yourFile.csv**' INTO TABLE **yourTableNameHere** FIELDS TERMINATED by ',' LINES TERMINATED BY '\n' IGNORE 1 LINES;</div><div id="bkmrk--6"></div><div id="bkmrk--7"></div><div id="bkmrk-you-should-then-see-">You should then see something like:</div><div id="bkmrk-query-ok%2C-10634-rows">Query OK, 10634 rows affected, 65535 warnings (0.48 sec)  
Records: 10634 Deleted: 0 Skipped: 0 Warnings: 251949</div>