- Dockerfile
- docker-compose.yml
- .env
You dont need to customise this file, you can if you want to use a custom mysql docker image
To customise this file you can update the environment variables in the yaml file
environment:
- MYSQL_ROOT_PASSWORD=password@1234
- MYSQL_DATABASE=mysqllocal
- MYSQL_USER=sqluser
- MYSQL_PASSWORD=sqluserpass@1234
- Clone the repository
git clone [email protected]:ananyakaushik48/mysql.git
- Change directory to target directory
cd mysql
- Run the container locally with docker-compose (hope you have docker installed)
docker-compose up -d
- To connect to the database from the command line (need to have mysql-client installed)
mysql -u root -p 'mysqllocal' -h 127.0.0.1 -P 3306 -D local