- MySQL version 8.0.16
docker build -t my-mysql:0.0.1 .
Change password for root user if you need in Dockerfile
.
ENV MYSQL_ROOT_PASSWORD mysql
docker run -d -it -v "$PWD/data":/var/lib/mysql -p 3306:3306 my-mysql:0.0.1
Install MySQL Workbench
from here.
And connect with the configuration below and create a database.
host=localhost
port=3306
user:root
password:mysql