Tag: mysql

How to connect Mysql Docker to other docker in Dockerfile?

I am using these Docker commands: docker network create –subnet=172.18.0.0/16 magentonet docker run -d –name mysql -p 3306:3306 –net magentonet –ip 172.18.0.23 -e MYSQL_ROOT_PASSWORD=magepass -e MYSQL_DATABASE=mySchema mysql:5 docker build -t magento-bdd . docker run –net magentonet –ip 172.18.0.22 -d magento-bdd When the command docker build -t magento-bdd . runs, I have this RUN command in […]

Cannot connect to MYSQL in a LAMP docker container

I have a LAMP container. I want to run WordPress, but it cannot connect to Mysql. I set the container port mapping to 3307:3306 because another container use the default mysql port. I tried to connect from host to the container’s mysql server to test it, mysql -u xxxx -h 127.0.0.1:3307 but the result is: […]

mysql docker container get remote host: Connection refused after container running

I tried to run multiple mysql docker container on one host server. After setting one first mysql container, it works fine. I following the same step to setting up second one and change the running port from 3306 to 3307 and use different path of dump.sql. After container starting up, I cannot telnet the container […]

Docker with `/bin/bash -c` running mysql deamon

I’m trying the mysql container. The CMD parameter for that container is mysqld. Therefore, the following parameters are the same. docker run –name db -e MYSQL_ROOT_PASSWORD=proot –rm mysql docker run –name db -e MYSQL_ROOT_PASSWORD=proot –rm mysql mysqld Now the problem arrives when I want to use multiple commands. In order to use multiple commands in […]

Docker – Telnet from container to host

I have a docker container which needs a Mysql connection, in test and prod I link it with a Mysql docker container, and all is fine. I wanna create a local environment on my machine in order to try the generated docker image before the release, and to do so I want to connect my […]

Avoid hard coding the mysql container ip in my apache container script

I have a mysql container which runs fine. I can start it and see it up and running in the docker ps list. I then try to run another learnitouch container in which an engine-db-seed.sh shell script tries to connect to the mysql container server. The learnitouch container Dockerfile contains: ENTRYPOINT [“/bin/bash”, “/usr/bin/learnintouch/engine-db-seed.sh”] The engine-db-seed.sh […]

Error while connecting WordPress Docker Container with MySQL

I have an issue with docker. I try to link an running mysql container with an wordpress container. Info about the mysql container (run-statement): docker run –name wordpressdbmysql -e MYSQL_ROOT_PASSWORD=— -p 4311:3306 -d mysql I have to change the port, because another mysql is already running and listening on port 3306. But for testing purposes […]

docker getaddrinfo ENOTFOUND mysql

Docker version: docker version Client: Version: 1.12.1 API version: 1.24 Go version: go1.6.3 Git commit: 23cf638 Built: OS/Arch: linux/amd64 Server: Version: 1.12.1 API version: 1.24 Go version: go1.6.3 Git commit: 23cf638 Built: OS/Arch: linux/amd64 I’m using this github repo to start a mysql container and a ghost container. I just follow the steps. I ever […]

MySQL 2002 Connection Refused – OSX/MySQL/Docker

I attempted this answer on How to allow remote connection to mysql, but I am still getting the following error: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] Connection refused Note: the above is while using “127.0.0.1” as the DB_HOST, when using “localhost” instead, the error is: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] No such […]

Testing a dockerized Ruby on Rails app with MySQL on CircleCI

I am trying to use CircleCI with my Dockerized Ruby on Rails app. The app is set to use MySQL. Locally, everything works fine; RSpec passes, everything is great. When testing in CircleCI, I can’t even get to the point the server is running and run the tests. CircleCI output curl –retry 10 –retry-delay 5 […]

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