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

Cannot connect to database after initial injection #36

Closed
ybizeul opened this issue Nov 3, 2018 · 6 comments
Closed

Cannot connect to database after initial injection #36

ybizeul opened this issue Nov 3, 2018 · 6 comments

Comments

@ybizeul
Copy link

ybizeul commented Nov 3, 2018

Regarding issue : phpipam/phpipam#2290

Unless specified otherwise, phpipam injects a standard user/password for later database access once the initial injection is done.

This results in impossibility to connect as the default host for the connection is localhost, which prevents phpipam container to connect to the database.

@pierrecdn
Copy link
Owner

Hi,
Maybe I didn't understand your issue, so feel free to correct me.

First, localhost is changed to mysql by default, so that people can freely link their containers using --link my-specific-name:mysql
Someone also introduced the ability to customize the mysql host.

So in the container setup, accesses are always seen as "remote".

Does it anwser your concerns?

@ybizeul
Copy link
Author

ybizeul commented Jan 5, 2019

I should have done a better job documenting this... I can't remember now what went wrong now. I guess we can close this.

Thanks for answering, I'll comment next time I install it.

@ybizeul
Copy link
Author

ybizeul commented Jan 5, 2019

Just talked to a friend, he had the same issue, he reminded me : The problem was on the DB side, things were fine on the php config files, but privileges in the DB (injected my the initial setup of the DB by php) specifies credentials user@localhost in the GRANT statement. After that, MySQL rejects connections from the phpipam container, you have to manually GRANT user@%

@pierrecdn
Copy link
Owner

pierrecdn commented Jan 5, 2019

If you follow the README instructions you shouldn't have these grant issues.
I guess the DB setup was somehow specific?

@pierrecdn pierrecdn reopened this Jan 5, 2019
@pierrecdn
Copy link
Owner

Is it still the case if you pull latest? I just commited cb4ec5b, it should fix common installations.
Feel free to reopen if still broken.

@ybizeul
Copy link
Author

ybizeul commented Jan 14, 2019

Thanks Pierre, I'll check and report here if needed!

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

2 participants