Docker compose file for MySQL 5.7
Published on 2019-09-26 • Modified on 2019-09-26
This is the docker compose file I am using for MySQL 5.7. As this is an official image, there should't be any problem. Before I was creating the container directly with Docker. But using Docker compose is so much easier! With this setup you can login with root/root. Don't use this in production. 😉/
version: '3.7'
# docker-compose -f docker-compose.yaml up -d
services:
# MySQL server database (official image)
# https://docs.docker.com/samples/library/mysql/
db:
image: mysql:5.7
container_name: db
command: --default-authentication-plugin=mysql_native_password
ports:
- "3309:3306"
environment:
MYSQL_ROOT_PASSWORD: root
More on Stackoverflow Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉