Tag: mysql

Docker dependencies design for containers configuration and startup

I containerize a web application which has container dependencies. The containers are listed here in their dependency order, the latter being dependent on the former. There is a mysql container which compiles mysql, installs it and configures it. There is a learnintouch container which installs files and seeds custom product data into the mysql container. […]

Docker container bash can't connect to local MySQL server through socket

It’s a long title but it should be explicit enough. If I run a docker container with bash and install mysql via apt-get install mysql-server the run the following command : mysql -u root -p I’m met with a resounding : ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) Same […]

Docker MySQL ERROR 1049 (42000): Unknown database 'users'

Hi I’m trying to create a MySQL database in Docker, here’s my code in start.sh #!/bin/sh echo “Starting DB…” docker run –name db -d \ -e MYSQL_ROOT_PASSWORD=123 \ -e MYSQL_DATABASE=users -e MYSQL_USER=root -e MYSQL_PASSWORD=123 \ -p 3306:3306 \ mysql:latest echo “Waiting for DB to start up…” docker exec db mysqladmin –silent –wait=30 -uroot ping || […]

docker-compose: reinitializing MySQL db every time

We have a Rails app with MySQL as DB. The db part of docker-compose.yml looks like db: image: mysql env_file: – ma.env volumes: – ./dump-db:/docker-entrypoint-initdb.d – ./my.cnf:/etc/mysql/my.cnf restart: always ports: – “3306:3306” environment: – MYSQL_HOST= and under ./dump-db folder there actually is an sql-dump of our db. Problem is, we need to have that exact […]

docker mysql restoring dump files

I have installed docker on my mac and given docker 12 GB of memory. I create a mysql container using the docker repo. I can easily restore .sql dump files which I have created except 1 file which is 1.2 GB in size. When I try to restore it mysql -uroot foo < foo_large.sql the […]

connecting error mysql db from host to docker container

I have a mysql server running on docker container.When I say docker-compose ps I see mysql is up. I have an ubuntu 16.04 host machine. I want to connect to mysql with command line. I am trying this : mysql –host=localhost –user=abc –password=123 abc –port=3310 but I am taking this error : mysql: [Warning] Using […]

mysql_config_editor with docker

Hi I’m trying to use mysql_config_editor tools directly in my Dockerfile: FROM mysql RUN mysql_config_editor set –login-path=local –user=root –password But this command ask the user to enter the password. Is there a way to set the password directly from the Dockerfile knowing that it is not possible to set the password directly in the command […]

Accessing mysql running in another container by a Jar running in another container

Existing Environment: A server having the following packages installed Nginx, Mysql, Java, Redis. The server is having one jar file which uses the Mysql server for database support. The Mysql JDBC driver use localhost as the hostname in the URL. In process of replicating the existing environment using Docker we perform the following tasks: Created […]

Orchestration bettween wildfly and mysql database

I’m using docker-compose to launch 1 container with jboss wildfly 10 and another with mysql. If the mysql container takes some time to launch, and in this case the wildfly gives the following error: 12:42:35,612 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool — 61) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable […]

Increasing mysql max_connections to 1024 in a docker container

I want to increase max_connections to 1024 in a docker container of mysql 5.6 hosted on AWS EC2. The instance type of the EC2 is m4.large. I’ve set max_connections to 1024 by adding max_connections=1024 in my.cnf, but I only saw 214 when typing show varialbes like ‘max_connections’; mysql command. Here is the my.cnf I have.: […]

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