Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

MySQL-Docker

Build

git clone https://github.com/carrot-dockerfiles/mysql-docker
cd mysql-docker/
sudo docker build -t "longwosion/mysql" .

Usage

sudo docker run -d -v /local/path:/var/lib/mysql --name=mysqlserver
    -p 127.0.0.1:3306:3306 longwosion/mysql

Default root password is empty, you could set it by the following command:

sudo docker run -d -v /local/path:/var/lib/mysql --name=mysqlserver
    -p 127.0.0.1:3306:3306 -e MYSQL_ROOT_PASSWORD="1234" longwosion/mysql

Connnect

Now we could connect to this docker container just by mysql-client

mysql -uroot -P 3306 -p1234 -h 127.0.0.1
Docker Pull Command
Owner
carrotdockerfiles
Source Repository

Comments (0)