Install Mysql by Docker
docker
mysql
Posted by Cookie Xu Monday, January 28, 2019
docker run -p 3306:3306 --name mysql -v /Users/shikuanxu/Documents/Docker/Mysql/config:/etc/mysql/conf.d -v /Users/shikuanxu/Documents/Docker/Mysql/logs:/logs -v /Users/shikuanxu/Documents/Docker/Mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:5.6
Username: root
Password: root
docker run -p 3306:3306 --name mysql -v /Users/shikuanxu/Documents/Docker/Mysql/logs:/logs -v /Users/shikuanxu/Documents/Docker/Mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:8.0.13
docker exec -it 69a27ffbc6d2 bash
mysql -u root -p