Tag: mysql

Running mysql_upgrade in Docker?

I was trying to create a user using: docker exec -i database mysql -uroot -proot -e “CREATE USER ‘dbadmin’@’%'” However I ran into this ERROR: ERROR 1054 (42S22) at line 1: Unknown column ‘password_last_changed’ in ‘mysql.user’

Can't see staring installation page of wordpress docker container based on alpine linux

Here is my configuration : OS : Windows 10 Enterprise x64 [Version 10.0.14393] Docker Toolbox: Docker version 1.12.5, build 7392c3b docker-compose version 1.9.0, build 2585387 My docker-compose.yml: version: ‘2’ services: wordpress: image: wordpress:4.7.0-php7.0-fpm-alpine links: – “mysql:mysql-database” ports: – 8080:80 – 9000:9000 expose: – “3306” – “8080” – “80” environment: WORDPRESS_DB_PASSWORD: example mysql: image: mysql ports: […]

Mysql in container or different VM

I am running MySQL database on different VM (separate from web server). Because of separate VM I can protect database by giving access permission to only server and closing all other ports other than 3306. Now, with docker I can set up LAMP server in one container and MySQL in other. How secure and scalable […]

Error when creating a MySQL database in a Dockerfile

I want to create a simple container that contains a MySQL server with an initialized database. My Dockerfile currently looks like this: FROM ubuntu:16.10 RUN apt-get update # install MySQL; root user with no password ENV DEBIAN_FRONTEND noninteractive RUN apt-get install -y mysql-server mysql-client RUN service mysql start RUN mysqladmin -u root create mydb CMD […]

Gitlab CI Runner | Custom mysql conf

I’m trying to set my own mysql conf for Gitlab CI Runner. I found in the documentation how to set my own php.ini : before_script: – cp ci/php.ini /usr/local/etc/php/conf.d/test.ini I didn’t find informations about how setting my.cnf, I tried : before_script: – cp ci/my.cnf /usr/local/etc/mysql/conf.d/my.cnf But /usr/local/etc/mysql/ doesn’t exist in the generated environment. This is […]

Resolve error: An error occurred while installing mysql2 (0.4.5), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.4.5'`

I am trying to build a docker image by running the command: docker build -t user:repository . and keep getting this error: An error occurred while installing mysql2 (0.4.5), and Bundler cannot continue. Make sure that `gem install mysql2 -v ‘0.4.5’` succeeds before bundling. The command ‘/bin/sh -c /bin/bash -l -c “gem install bundler && […]

Install an sql dump file to a docker container with mariaDB

I am just learning the basics of docker, but have come stuck on importing an SQl file from the local system. I am on windows 10 and have allowed my docker containers to access my shared drives. I have an SQL file located on D i would like to import to the base image of […]

wordpress docker exits immediately

I’m trying to get wordpress up and running with docker on OSX 10.12.1… First I start up mysql: docker run –name dockermysql -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=wordpress -e MYSQL_USER=wordpress -e MYSQL_PASSWORD=secret -d mysql:5 That seems to work fine: $ docker ps -a f7d1562def4a mysql:5 “docker-entrypoint.sh” 33 minutes ago Up 33 minutes 3306/tcp dockermysql but then I […]

MySQL Automatically Restarting

Problem: MySQL is shutting down after startup – even after mysqld reports “ready for connections”. I’m simply using the publicly available mysql image. Does anyone know if there is some kind of setting or error that would cause a restart? The logs don’t include any errors that would indicate a restart would happen. After the […]

How to connect MySQL client with server running in Docker

I am using Docker first time. I am trying to connect docker based MySQL with my Navicat client. How do I get docker IP and then use it for connection? Here are a few details: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b984b6659d20 mysql:5.7 “docker-entrypoint.sh” 8 minutes ago Up 7 minutes 3306/tcp myre_mysql_run_1 d34d8974912c […]

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