- docker >= 17.12.0+
- docker-compose
- Clone or download this repository
- Go inside of directory,
cd head-first-sql
- Run this command
docker-compose up -d
This Compose file contains the following environment variables:
MYSQL_ROOT_PASSWORD
the default value is rootMYSQL_DATABASE
the default value is test_db
For you to configure your variables feel free to duplicate the .env.example
file, rename the file and remove .example
and include its variables.
localhost:3306
- Username: root (as a default)
- Password: changeme (as a default)
- URL:
http://localhost:8081
- Server: mysql-compose (as a default)
- Username: root (as a default)
- Password: root (as a default)
Run this comands
$ docker exec -it head-first-sql_mysql-compose_1 bash
mysql -uroot -p{MYSQL_ROOT_PASSWORD}