Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant link phpmyadmin container with database #15

Open
deckoff opened this issue Aug 1, 2018 · 0 comments
Open

cant link phpmyadmin container with database #15

deckoff opened this issue Aug 1, 2018 · 0 comments

Comments

@deckoff
Copy link

deckoff commented Aug 1, 2018

Hello
I am trying to connect official phpmyadmin container to this container, but cannot login to the database via web interface.
docker run --name new_db -dt -p 1880:80 fauria/lamp
docker run --name myadmin_test -d --link new_db:db -p 28080:80 phpmyadmin/phpmyadmin
I would get inside the container, and create a new user:
mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

I will get mysqli_real_connect(): (HY000/2002): Connection refused error when trying to login

On the other hand, I have no trouble connecting ot the official mariadb container:
docker run --name=testsql -e MYSQL_ROOT_PASSWORD=pass -d mariadb
docker run --name myadmin -d --link testsql:db -p 38080:80 phpmyadmin/phpmyadmin
This works just fine.

At the moment, my workaround is installing phpmyadmin inside the container, which works fine.
I am on
`Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial

Docker version 18.03.1-ce, build 9ee9f40

`

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

No branches or pull requests

1 participant