Giter Site home page Giter Site logo

Comments (10)

michalkleiner avatar michalkleiner commented on July 28, 2024 3

So I temporarily resolved it using a script that is automatically run when the container starts up.

fix-permissions.sh

#!/bin/bash

mysql -u root -e "grant all on *.* to '$MYSQL_USER'@'%' identified by '${MYSQL_PASSWORD}' with grant option; flush privileges;"

and its use in Dockerfile:

# copy the file into the container
COPY fix-permissions.sh /docker-entrypoint-initdb.d/fix-permissions.sh

# make it executable
RUN chmod +x /docker-entrypoint-initdb.d/fix-permissions.sh

from mariadb-docker.

projectivemotion avatar projectivemotion commented on July 28, 2024 3

This issue is still not resolved. Switched to mysql image. No problems.

from mariadb-docker.

tianon avatar tianon commented on July 28, 2024

Can you provide us a little more information about how you're running it? I can't seem to reproduce:

$ docker pull mariadb
Using default tag: latest
latest: Pulling from library/mariadb

fdd5d7827f33: Already exists 
a3ed95caeb02: Already exists 
2d9b55a37647: Already exists 
88a4bacbf934: Already exists 
d2f0eb2850d3: Already exists 
e35651814623: Already exists 
12cafcc1e597: Already exists 
b12059a0fd60: Already exists 
9643f0599420: Already exists 
452cf8ba3692: Already exists 
Digest: sha256:de91e4cb58e716a12f0ee204d628ba9c855f217a42f96360181c28beb0e7b075
Status: Image is up to date for mariadb:latest
$ docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb
c5b36b0bf92e473b796e6fc2708c0e747ccaa21ab800d769abc6dbcc4e8f957a
$ docker run -it --link some-mariadb:mysql --rm mariadb sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.12-MariaDB-1~jessie mariadb.org binary distribution

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SELECT 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

MariaDB [(none)]> 

from mariadb-docker.

Azerothian avatar Azerothian commented on July 28, 2024

I use rancher and it likes to setup custom networks for my docker containers which in turn causes the same issue

Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1130] Host '10.42.209.230' is not allowed to connect to this MariaDB server

mariadb:
  environment:
    MYSQL_ROOT_PASSWORD: 1234
    MYSQL_DATABASE: owncloud
  labels:
    io.rancher.container.pull_image: always
  tty: true
  image: mariadb
  volumes:
  - /opt/docker/owncloud/db:/var/lib/mysql
owncloud:
  environment:
    VIRTUAL_HOST: owncloud..local
    VIRTUAL_PORT: '8080'
  labels:
    io.rancher.container.pull_image: always
  image: owncloud
  links:
  - mariadb:mariadb
  volumes:
  - /opt/docker/owncloud/data:/var/www/html

from mariadb-docker.

michalkleiner avatar michalkleiner commented on July 28, 2024

I'm experiencing the same problem when using docker-compose -p PROJECT_NAME up, it seems to be related to the custom network which gets created instead of the default one when the project name switch is used.

from mariadb-docker.

yosifkit avatar yosifkit commented on July 28, 2024

Unable to reproduce. Closing old issue.

from mariadb-docker.

schmunk42 avatar schmunk42 commented on July 28, 2024

I am seeing this on Travis https://travis-ci.org/schmunk42/yii2-giiant/builds/282246176 - works fine locally.

[edit]
Sorry, does not really belong here as I am using a base-image from tutum https://github.com/schmunk42/docker-mariadb-example-databases/blob/master/Dockerfile

from mariadb-docker.

M-Pixel avatar M-Pixel commented on July 28, 2024

I'm experiencing this issue using the OwnCloud docker-compose.yml on the latest version of Docker on OpenSUSE.

from mariadb-docker.

macskay avatar macskay commented on July 28, 2024

Experiencing it on Ubuntu 16

from mariadb-docker.

akkie avatar akkie commented on July 28, 2024

I had the same issue on kubernetes and could fixing it by setting explicitly MYSQL_ROOT_HOST to %.

from mariadb-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.