Inside the laradock folder i am changing the mysql database name/user/pass in the .env file
When i rebuild the containers, it seams the name/user/pass are still the default ones, and the new values are not used at all.
I tried everything; even docker stop $(docker ps -qa) && docker rm $(docker ps -qa) && docker volume rm $(docker volume ls -q) and no success.
Am I doing something wrong?
On rebuild to use the new values.
same issue.
Hi @ConstantinChirila, please provide more info
diff .env env-sample
I've found the solution.
Laradock saves the mysql data in the "DATA_SAVE_PATH" (my case was C:\Users{yourusername}.laradock\data" and once you build the container for the first time it never overrides it.
What i did, i just removed the "data" folder from ".laradock" and rebuild my containers, and the values in the .env files were applied (Careful as you will lose your databases as well, it is like a complete wipe of the mysql container including any config or data).
From what I understand, it is on purpose so you wont lose data on rebuilding the container (like i've mentioned).
Another solution would be to log in to the mysql container, and change the password in there. (i have not tried this solution)
Most helpful comment
I've found the solution.
Laradock saves the mysql data in the "DATA_SAVE_PATH" (my case was C:\Users{yourusername}.laradock\data" and once you build the container for the first time it never overrides it.
What i did, i just removed the "data" folder from ".laradock" and rebuild my containers, and the values in the .env files were applied (Careful as you will lose your databases as well, it is like a complete wipe of the mysql container including any config or data).
From what I understand, it is on purpose so you wont lose data on rebuilding the container (like i've mentioned).
Another solution would be to log in to the mysql container, and change the password in there. (i have not tried this solution)