docker pull fortytwoio/mysql-server
docker run -d -e "MYSQL_ROOT_PASSWORD=changeme" -P --volumes-from dbdata fortytwoio/mysql-server
Docker Hub fortytwoio/mysql-server
MYSQL_ROOT_PASSWORD: Sets this password for therootDB user which has ultimate access. Optional.MYSQL_DATABASE: Create a database with the provided name andutf8_general_ci. Optional.MYSQL_USER: Create this user and grant with the access to$MYSQL_DATABASE. Optional.MYSQL_PASSWORD: Password for the user to be created
Fine-tuning:
MYSQL_RAMDISK: Run MySQL in a ramdisk. Value sets the disk size in megabytes. Optional. NOTE: Requiresdocker run --privilegedMYSQL_SET_KEYBUF=128M: Key buffer sizeMYSQL_SET_QCACHE=32M: Query cache size