Tag: mysql

Can't connect to mySql docker container with JDBC

I use Docker Maven Plugin When test-integration starts i can connect to mysql on container in terminal with this command: mysql -h 127.0.0.1 -P 32795 -uroot -p and everythings works good but when i want to connect mysql in java app with JDBC with this code: Class.forName(“com.mysql.jdbc.Driver”).newInstance(); Connection connection = DriverManager.getConnection( “jdbc:mysql://127.0.0.1:” + System.getProperty(“mysqlPort”) + […]

Connecting to a mysql running on a Docker container

I’m trying to run mysql server on a Docker (installed with Docker Toolbox for Mac) container and access it from my machine running OS X Yosemite. The documentation from the official repo does not explain how to connect from outside the docker host !! I’ve created a container using the official repository as follows: $ […]

mysql in docker container hangs

Two mysql(5.6.20) instances in two docker containers (1.8.32), master and slave build semi-synchronous replication with each other, then users do some dml or ddl operating in master always。 after ten days or more, all the clients which connect to slave will hang gdb -p/strace slave mysqld process hangs pstack/perf top -p slave mysqld process show […]

Mounting container volume from the hosts' drive?

im setting up a mysql container like so: docker run -v /srv/information-db:/var/lib/mysql tutum/mysql /bin/bash -c “/usr/bin/mysql_install_db” now, this works when nothing is mounted on /srv on the host, but when i mount my drive, docker seems to write to the underlying filesystem (/), eg: /]# ls -l /srv total 0 /]# mount /dev/xvdc1 /srv /]# […]

Why mysql backup is not restored into my docker container ?

I want to dockerize mysql database. I have .sh script for preparing environment, creating database, user and other things. Mysql dump restore command not working in my .sh script, but working good if i open container shell and exec command in it. I want working command in my .sh script. Whats wrong in my script […]

Can't connect to database with docker-compose with mysql and php 7

I’m having problems connecting to my linked mysql container from my php 7.0.1-apache container. PHP container Dockerfile: FROM php:7.0.1-apache # Initialize html and php.ini COPY src/ /var/www/html/ COPY config/php.ini /usr/local/etc/php/ # Update modules. RUN apt-get update docker-compose.yml: web: build: . ports: – “80:80” links: – “db” volumes: – “./src/:/var/www/html/” db: image: “mysql” ports: – “3306:3306” […]

Connect docker container to local workbench MySQL DB

HI I have my web app running on my local machine and connected to mysql workbench, I am now trying to dockerize the webapp. I can’t seem to get it to connect to the DB on my local dev machine (I am running docker for windows), can anyone tell me how I would go about […]

docker.io – Docker linking between application & database containers

I am trying to use my Scala-Akka application with my MySQL database on two separate Docker containers. I found out that Docker allows developers to link their application to their databases with the flag named –link. In my Dockerfiles in which I’ve used to create my images, I have add in EXPOSE 3306 8080 to […]

MySQL scripts in docker-entrypoint-initdb are not executed

I am trying to create multiple databases when a MySQL container starts up. According to https://github.com/docker-library/mysql/pull/18, I can mount or copy my scripts in the /docker-entrypoint-initdb.d of the image and they will be executed automatically on start up. However my scripts are not at all executed. Seems like the docker-entrypoint.sh doesn’t see files in the […]

Linking django and mysql containers using docker-compose

I’ve been following with the docker-compose tutorial here (linking django and postgres container). Although I was able to go through with the tutorial I’m however not able to proceed with repeating the same using a mysql container. The following are my dockerfile and docker-compose.yml ` db: image: mysql web: build: . command: python manage.py runserver […]

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