参考链接
1
sudo docker exec mysql-docker-container env
或者如果是docker-compose启动话,也可以看
1234
services: db: environment: MYSQL_ROOT_PASSWORD: 'password'
sudo docker-compose run db env
当然也可以直接检查docker-compose.yml
docker-compose.yml