Importing CSV to MySQL (docker-compose)

In order to import CSV to MySQL, you need to enable the global variable SET GLOBAL local_infile=1. If you do this via SQL Shell, then everything works fine.

But I need to make this setting set automatically when starting the docker container. To do this, I added the --local-infile=1 command to docker-compose at .wappler\targets\Development\docker-compose.yml, but it doesn’t work.

Tell me, please, what could be the problem?

I think you have a - rather than _ in the command.

Unfortunately, the advice didn’t help.

image

image

Maybe I can edit my.cnf like in this tip?

Is it possible to use a server action to execute a command in the console?

Custom extensions can be built to do that.

1 Like

Thank you all. I managed to solve the problem. It turns out that after changing docker-compose, it is necessary not just to save the project and restart Wappler, but to do deploy.