Tag: mysql

Docker: Granting access to linked mysql container

So I have a mysql-client container and a mysql-database container, just for testing purposes. I have linked the 2 containers using docker run –link. Now I want to create a user in the database and grant it select, create, update, etc. access, so that it can connect to the database and perform queries, etc. So, […]

import mysql data to kubernetes pod

Does anyone know how to import the data inside my dump.sql file to a kubernetes pod either; Directly,same way as you dealing with docker containers: docker exec -i container_name mysql -uroot –password=secret database < Dump.sql Or using the data stored in an existing docker container volume and pass it to the pod .

mysql 5.7 can't allow docker IP access on CentOS7

I’ve installed Mysql5.7 and docker service on CentOS 7.1. It’s ok that connect mysql with command mysql -u root locally. But it’s fail to connect when I tried to use mysql -u root -h, in which is the local docker0 ip address. [root@test1 workspace]# mysql -u root -h ERROR 1130 (HY000): Host […]

“Base table or view not found” error in docker container

I have Laravel app with mysql db. I’m trying to run it in docker using this docker-compose.yml: load_balancer: image: tutum/haproxy links: – web ports: – “80:80” cache: image: redis web: image: andrewmclagan/nginx-hhvm links: – db – cache volumes: – ./:/var/www environment: – APP_ENV=local – DB_DATABASE=regappbase – DB_PASSWORD=Q1w2e3r4t5 – DB_HOST=db – VIRTUAL_HOST=laravel.local db: image: mysql environment: […]

Connect to MySQL in a docker container (Vagrant on Windows/VirtualBox)

I am trying to create a virtualised dev environment on Windows using Vagrant and Docker (as are a lot of people). The problem I have is that I cannot connect (or I dont understand how to) from MySQL Workbench running on my Windows laptop to my MySQL DB in a Docker container in Boot2Docker. This […]

Automated build with docker-compose (Application+mySQL server)

I have some problems while building an automated build for my web application, using mySQL. I will use the example from https://github.com/ehazlett/docker-sample-java-mysql-tomcat. This is my fig.yml file: db: image: orchardup/mysql environment: MYSQL_USER: java MYSQL_PASSWORD: java MYSQL_DATABASE: javatest ports: – “3306” dbinit: image: orchardup/mysql entrypoint: /bin/bash volumes: – .:/host command: -c “sleep 4; mysql -u java […]

Concurrent database creation

My web app requires some initial database scripts to be executed during installation. These are just some CREATE TABLE scripts that need to be run. I’m working on dockerizing it. I’ve been trying to use the Docker 1.12’s swarm mode to create multiple container replicas of my web app which use a shared database. (An […]

Laravel MySQL Error ONLY on Scheduled Tasks (via cron)

I have a task using the Laravel task scheduler than fires perfectly. It fires to call a public method named Task::checkSpiders(). This hits an API (works fine) then should update local DB accordingly. If i create a route as so… Route::get(‘/test’, function () { $test = Task::checkSpiders(); } It run’s perfectly. When i run it […]

Run Teampass in docker with a running nginx proxy

@Moderators: can you please add the Tag teampass to the tag list? I want to run Teampass as a docker container with a nginx as a proxy. I’m not sure if the problem, that Teampass brings it own Apache and works against my nginx or, if I got something else completely wrong. I enter this […]

docker mysql connection via php

I have the following settings in docker-compose.yml mysql: image: mysql:latest ports: – “3306” volumes: – /var/lib/mysql environment: MYSQL_ROOT_PASSWORD: secret MYSQL_DATABASE: project MYSQL_USER: project MYSQL_PASSWORD: project In my index.php, I want to connect to my database container, however, I’m not sure what to type in host=localhost, the following code doesn’t work <?php $db = new PDO(‘mysql:host=localhost;dbname=project;charset=utf8mb4’, […]

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