How could I change root password in docker container since the container stop automatically once I stop the mysql service.
Should I stop the mysql container and deploy
First go to docker container bash using
docker exec -it containerId bash
Then
To Set the new mysql password
mysqladmin -u root -p'oldpassword' password 'newpassword'
To set the password empty use
mysqladmin -u root -p'oldpassword' password ''
Make sure there is no space between -p and oldpassword
-p
oldpassword