Running an Ad-Hoc MySQL Instance Locally with Docker

For some reason I am incapable of committing the following to memory:

$ docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
$ docker exec -it mysql mysql -uroot -p

Adding --restart=unless-stopped to the docker run command will make the MySQL instance persist after a system restart or shutdown.