Keywords: MySQL - Other - Technical issue - Other
So I've been working on a project for a couple years now, and I've been using docker to run bitnami/mysql5.7. I pointed docker to a folder on my development machine (macbook) and data persists just fine.
Now I am trying to setup my production environment on Ubuntu 18.04 LTS using docker-compose. I start phpmyadmin and bitnami/mysql5.7 without a volume specified and I get no errors and everything seems to work fine: I can login to phpmyadmin using my mysql root+password as specified in docker-compose file.
But when I add a volume to mysql, mapping an existing folder on the server to a folder in the container, while I still get no errors, I can't login to mysql. I copied the folder I have on my development machine to the server and placed it at /mysql-data, and set this in the docker-compose file and I can't login via phpmyadmin or the mysql cli tool. I did notice that if I specify a folder that does not yet exist it seems to work fine. But if I can't copy my database files to that folder, it would not be ideal to use docker or docker compose to run my database....it's this one of the main reasons people use docker technologies?
Any help would greatly appreciated, thanks.