Public Repository

Last pushed: a year ago
Short Description
MySQL 5.6 Database
Full Description

MySQL 5.6

How to use this image

$data_dir will be the folder that stores all mysql data on your server.
$logs_dir will be the folder that stores all mysql logs on your server.
$container_name will be the name that you can set up for this container.
$yourapplicationimage will be the name of the application that have to connect to MySQL.
$yourpassword will be the MySQL root user's password.

How to store logs

docker run -d -v $logs_dir:/var/log/mysql alexandregilberga/mysql

How to store data

docker run -d -v $data_dir:/var/lib/mysql alexandregilberga/mysql

Initialize MySQL instance

docker run -ti --rm -v $data_dir:/var/lib/mysql -v $logs_dir:/var/log/mysql -w /root alexandregilberga/mysql init.sh $yourpassword

Start a MySQL server instance

docker run -d --name $container_name -v $data_dir:/var/lib/mysql -v $logs_dir:/var/log/mysql alexandregilberga/mysql

Connect to MySQL from another application in another Docker container

docker run -d --link $container_name $yourapplicationimage

Using a custom MySQL configuration file

docker run -d -v $config_file:/etc/mysql/my.cnf alexandregilberga/mysql
Contact gilbi365@gmail.com for more information.
Docker Pull Command
Owner
alexandregilberga

Comments (0)