Tag: mysql

Docker – secure mysql configuration

I want to make a separate docker container for mine mysql database which will run for my production and test environment. The problem is that it has the potential to exposes the port number and environment values to for example hackers who have gained access to the container. How can I write a secure mysql […]

Deploying Docker containers with port-mapping on Mesos/Marathon

I am currently working on a team project utilizing Docker with Apache Mesos/Marathon. To deploy MySQL docker containers on Mesos/Marathon, we have to create a JSON file with port mapping. I have searched everywhere on the internet and just can’t find any sample JSON file to look on for port mapping. Anyone have done this […]

MySQL Setup using Docker

I’m trying to create a setup where when I do a “docker run” off a Dockerfile that I’ve created, docker will install and setup mysql, and then create a database for me to use. Below is my simple docker file that pulls from the existing dockerfile/mysql FROM dockerfile/mysql COPY dbsetup.sql /tmp/dbsetup.sql RUN bash -c “/usr/bin/mysqld_safe […]

Cannot delete files on docker host

I’m using the following shell script to extract my databases in the entrypoint and startup the container. #!/bin/bash if [ ! -d “/var/lib/mysql/assetmanager” ]; then tar -zxvf mysql.tar.gz fi exec /usr/bin/mysqld_safe On startup I mount a local directory to the /var/lib/mysql directory with the -v parameter and extract then the files with the above script. […]

How to access a mysql database that is into a Docker continer?

I’m working in a windows environment and I have my MySQL database into a Docker container, but how I should access from an external application? Right now I’m just want to use a regular Java Class to test the connection but what address should I use? I’ve tried with the boot2docker ip, but that doesn’t […]

How can I enable MySQL binary logging using the official Docker image?

What would be the best way to enable binary logging using the official mysql image? I have tried using the mysql:5.7 image, overriding the command when running it to also pass through the startup options to enable binary logging to mysqld (see below). The problem with this approach is that the mysql user does not […]

dockerfile – Unable to connect error

So here’s what i have to do: i need to set up some containers automatically using docker. One of them is liek this: Debian Squeeze with limited CPU shares and limited memory (1 cpu share and 512 mb memory),preinstalled apache2,build-essential,php5,mysql-server-5.5,openssh-server and with some ports opened (8000 for Apache and 1500 for MySQL). So i created […]

Docker: How does this (not) work?

I am trying to create a docker image which runs an sql server. For this purpose I did the following steps on a Windows machine. Run a mysql container to copy an init file into the virtual machine (not sure whether this step is actually necessary): docker run -i centurylink/mysql /bin/bash -c ‘cat > table.sql’ […]

Installation of system tables failed! boot2docker tutum/mysql mount file volume on Mac OS

I have trouble mounting a volume on tutum/mysql container on Mac OS. I am running boot2docker 1.5 When I run docker run -v $HOME/mysql-data:/var/lib/mysql tutum/mysql /bin/bash -c “/usr/bin/mysql_install_db” i get this error Installation of system tables failed! Examine the logs in /var/lib/mysql for more information. Running the above command also creates an empty $HOME/mysql-data/mysql folder. […]

MYSQL installation errors with docker

I am trying to install mysql from a docker container on rhel6. This is my dockerfile: #HELLO FROM rhel6 MAINTAINER xxxx ADD ./perl /usr/bin/ RUN whereis perl RUN ls -lrt /usr/bin/ RUN yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm -y RUN yum update RUN yum install mysql ADD ./startup.sh /opt/startup.sh EXPOSE 3306 CMD [“/bin/bash”, “/opt/startup.sh”] This is my startup […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.