Skip to content
This repository has been archived by the owner on Aug 25, 2019. It is now read-only.

docker-composer up error #18

Closed
lamjack opened this issue Mar 15, 2016 · 5 comments
Closed

docker-composer up error #18

lamjack opened this issue Mar 15, 2016 · 5 comments

Comments

@lamjack
Copy link

lamjack commented Mar 15, 2016

hi all,

i got a problem.

my docker-composer.yml file,

mariadb:
  restart: always
  image: hachque/mariadb
  volumes:
    - /home/docker/srv/phabricator/mariadb:/var/lib/mysql
phabricator:
  restart: always
  image: hachque/phabricator
  volumes:
    - /home/docker/script/phabricator/config:/config
    - /home/docker/srv/phabricator/repo:/srv/repo
  ports:
    - 22:22
    - 22280:22280
  links:
    - mariadb:linked_mariadb
  environment:
    - VIRTUAL_HOST=phabricator.xxx.com

and the script.pre file,

#!/bin/bash

# Set the name of the host running MySQL:
./bin/config set mysql.host "$LINKED_MARIADB_PORT_3306_TCP_ADDR"

# If MySQL is running on a non-standard port:
./bin/config set mysql.port "$LINKED_MARIADB_PORT_3306_TCP_PORT"

# Set the username for connecting to MySQL:
./bin/config set mysql.user "root"

# Set the password for connecting to MySQL:
./bin/config set mysql.pass ""

# Set the base URI that will be used to access Phabricator:
./bin/config set phabricator.base-uri "https://phabricator.xxx.com/"

when i runing the docker-composer up command,

i got the error log,

phabricator_1 | Raw MySQL Error: Attempt to connect to root@172.17.0.3 failed with error
phabricator_1 | #1130: Host '172.17.0.4' is not allowed to connect to this MariaDB server.
phabricator_1 | [ FAILED ] /etc/init.simple/10-boot-conf

could tell me what happen?

@hach-que
Copy link
Contributor

You need to connect to the MySQL server and grant permissions to access
from any host. The MySQL server by default only has root access from
localhost, so you'll need to login and run a grant query to set up
permissions.

On Mon, 14 Mar 2016, 22:16 JackLam notifications@github.com wrote:

hi all,

i got a problem.

my docker-composer.yml file,

mariadb:
restart: always
image: hachque/mariadb
volumes:
- /home/docker/srv/phabricator/mariadb:/var/lib/mysqlphabricator:
restart: always
image: hachque/phabricator
volumes:
- /home/docker/script/phabricator/config:/config
- /home/docker/srv/phabricator/repo:/srv/repo
ports:
- 22:22
- 22280:22280
links:
- mariadb:linked_mariadb
environment:
- VIRTUAL_HOST=phabricator.xxx.com

and the script.pre file,

#!/bin/bash

Set the name of the host running MySQL:

./bin/config set mysql.host "$LINKED_MARIADB_PORT_3306_TCP_ADDR"

If MySQL is running on a non-standard port:

./bin/config set mysql.port "$LINKED_MARIADB_PORT_3306_TCP_PORT"

Set the username for connecting to MySQL:

./bin/config set mysql.user "root"

Set the password for connecting to MySQL:

./bin/config set mysql.pass ""

Set the base URI that will be used to access Phabricator:

./bin/config set phabricator.base-uri "https://phabricator.xxx.com/"

when i runing the docker-composer up command,

i got the error log,

phabricator_1 | Raw MySQL Error: Attempt to connect to root@172.17.0.3 failed with error
phabricator_1 | #1130: Host '172.17.0.4' is not allowed to connect to this MariaDB server.
phabricator_1 | [ FAILED ] /etc/init.simple/10-boot-conf

could tell me what happen?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#18

@lamjack
Copy link
Author

lamjack commented Mar 15, 2016

i was solved, thanks for all.

@bweston92
Copy link

@lamjack how you fix this? According to the dockerfiles entry point (I use official MySQL) it should be already set to wildcard.

https://github.com/docker-library/mysql/blob/d7e71447ff3ad3c579ac3cca8c0dc090d11d4baf/5.7/docker-entrypoint.sh#L71

@hach-que
Copy link
Contributor

@bweston92 That's a different Docker container to hachque/mariadb, which is the one in use for this issue. The hachque/mariadb docker container doesn't have a grant on all hosts by default (arguably it should because it's not very useful without it, but scripting it so that it only happens on first run is tricky and I haven't got the time to dedicate to it).

@hach-que
Copy link
Contributor

I'm going to close this issue since the original question is solved (run the GRANT query to give other Docker containers access). If you have other questions about configuration, feel free to open another issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants