Tag: mysql

Docker VS Native installation on a server. How to recover from downtime mysql/mariadb without data lloss

Fellows, I have the following assumption: I have an application X (let us e wordpresss) running into a docker container and links to another docker container running mysql. Annd for some reason I lose the database it there a way to recover without any data loss from the latest changes? For some reason (not sure […]

Is MariaDB data lost after Docker setting change?

I’ve setup a basic MariaDB instance running in Docker – basically from starting the container using the Kitematic UI, changing the settings, and letting it run. Today, I wanted to make a backup, so I used Kitematic to change the port so I could access it from a machine to make automated backups. After changing […]

Mysql docker container block while it's importing data (OSX)

I’m working with two containers: server (php+apache) and mysql (image). I’m using the latest docker version and OSX El Capitan. This is my docker-compose.yml: server: build: docker/images/server ports: – “80:80” – “443:443” volumes: – .:/var/www/html links: – mysql tty: true mysql: image: mysql environment: MYSQL_ROOT_PASSWORD: root MYSQL_USER: user MYSQL_DATABASE: test volumes: – “./.data/db:/var/lib/mysql” When I’m […]

Docker container connection to host

I have a docker installation on a virtual Ubuntu server. On this server there is also a mysql server installed. Now I want, that a container can access to the mysql server on the host server. But I can’t. If I want to connect with the mysql client to the host I get back ERROR […]

Django docker container failed to connect to mysql container with error “Can't connect to MySQL server on 'db' (111)”)

I am trying set up a Django development environment using docker. Though I can connect to the mysql on host machine. But the web container failed to connect to mysql container with following error: django.db.utils.OperationalError: (2003, “Can’t connect to MySQL server on ‘db’ (111)”) Below are the docker configurations and django configuration: ———docker-compose.yml——— version: ‘2’ […]

“Can't connect to local MySQL server” in docker-compose

I have Laravel application with MySQL and I’m trying to run it in Docker using docker-compose. But when app trying to connect DB, it throws: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) My docker-compose.yml: load_balancer: image: tutum/haproxy links: – web ports: – “80:80” cache: image: […]

docker commit mysql doesn't save

I am trying to create a docker image from a mysql container. The problem is that db of the new image is clean, but files/folders, which I create manually in the origin container before commit, are copied. base mysql image is official 5.6 docker is 1.11. I checked that folder /var/lib/mysql/d1 appears when a db […]

PHPUnit testing FAILS ONLY when visiting the root page( visit('/') ) in Laravel 5

I run Laravel applic ation in docker container dockervel and the test <?php use Illuminate\Foundation\Testing\WithoutMiddleware ; use Illuminate\Foundation\Testing\DatabaseMigrations ; use Illuminate\Foundation\Testing\DatabaseTransactions ; use App\User1; class MyTest extends TestCase { public function testExample() { $this->assertTrue(true); } public function providerAllUrisWithResponseCode() { return [ [‘/’, 200], [‘/thank’, 200], [‘/non-existing’, 404], ]; } public function testDisplayThankYou($value=”) { $this->visit(‘/thankyou’) ->see(‘THank […]

Behat, MySql Connection error in Laravel5 : 'PDOException''SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql' (2)'

I run Laravel applic ation in docker container dockervel and my feature is : Feature: Registation form In order to test register on this site As a visitor I need to fill in the necessary info Scenario: Given I am on the homepage Then I should see “Welcome” When I run vendor/bin/behat I get this […]

Connect tomcat container to mysql container

I am trying to connect a container with tomcat to a container with mysql in order to deploy an app. I have reproduced the same into a vagrant machine (tomcat 6, mysql 5.6) but now I want to do it using docker containers. I used this answer here with some extra additions. For the mysql […]

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