Wednesday, May 22, 2019

Docker: Run MySql Server

A practical way to start MySQL server using docker:



docker run -d -p 3306:3306 --name=mysql-server --env="MYSQL_ROOT_PASSWORD=123456" mysql --default-authentication-plugin=mysql_native_password


Then just connect outside the container with host:
localhost, port:3306, user:root, password:123456