Check out example codes for "docker mysql random root password". It will help you in understanding the concepts better.

Code Example 1

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag

Learn ReactJs, React Native from akashmittal.com