I have a running docker image with a database where, for some reason, the columns are in camel-case. I have been searching how to change the value of lower_case_table_names to 1.

How can I make this change without having to recreate the docker image?

  • 2
    According to the mysql doc this system variable can only be configured during server configuration, it can't be changed after the server is initialized.
    – kevinnwhat
    Oct 10, 2019 at 21:29
  • On MySQL 8, you may be forced to re-install. Before that, see the solutions given here.
    – Rick James
    Oct 16, 2019 at 23:35

1 Answer 1


2 options;

  1. Build the container and ADD or COPY a my.cnf file into place with your desired options.
  2. Bind mount a config file into the container as part of the run command

I think there’s possibly a 3rd but I’m not in the position to test but you can possibly add startup options to the docker run command e.g.

docker run -d {other necessary options} mysql/mysql-server:latest —lower-case-table-names
  • at the end it doesn't even matter...I had to create the new yml file for docker compose and then restore the 5GB db. I'm marking your answer as the solution as it the steps are more likely to solve my issue. Thank you
    – Alejandro
    Oct 11, 2019 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.