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

[BUG] Special characters in MYSQL_PASSWORD result in a not working database access #27

Open
SteveTh3Piirate opened this issue Nov 10, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@SteveTh3Piirate
Copy link

I've previously had a version of PF running on my Unraid Server, I've got this one sort of running but for some reason the database is denying access. Below is the quote I'm getting from withing the Setup Page.

SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.25.0.5' (using password: YES)

I'm not sure what the problem is, i cannot even log in through terminal, gives me the same errors.

@fleischsalatinspace
Copy link
Collaborator

From slack:

there is or used to be a bug/strange behavior in the one of the entryscripts in the image. If you use any special characters in your MYSQL_PASSWORD, the sql connection fails

Can you provide technical details on:

i cannot even log in through terminal, gives me the same errors.

@SteveTh3Piirate
Copy link
Author

I edited the docker-compose.yml

Instead of using image: bianjp/mariadb-alpine:latest

I used image: linuxserver/mariadb:latest

Instantly let me in and set up tables. Very Strange.

@fleischsalatinspace
Copy link
Collaborator

Can you please rename the issue to
[BUG] Special characters in MYSQL_PASSWORD result in a not working database access. This will be worked on in combination with possible changes to the base images. thank you

@samoneilll samoneilll changed the title Database Refusing Access [BUG] Special characters in MYSQL_PASSWORD result in a not working database access Nov 18, 2021
@samoneilll
Copy link
Contributor

I've tried to recreate this issue by slowly adding more special characters to the password till I ended up with MYSQL_PASSWORD="P4#@%^&*$-></?=_~", and it's still working using the brianjp/mariadb-alpine image, on macOS as the host.

I have a suspicion that it's not about the password of the image itself, but rather about the host machine and how the values are read from .env. If anybody has a combination of host OS and password that I could try to test with I'd appreciate it.

@barndawgie
Copy link

I encountered this problem on an AWS EC2 instance running their stock Ubuntu 20.04 image, so should be relatively easy to replicate.

@rwc
Copy link

rwc commented Nov 30, 2021

@samoneilll I was able to reproduce with Debian 10 & Debian 11.

  1. The quotes are being interpreted as part of the password itself
  2. When connecting to the database locally, said password is refused. After adding command: --skip-grant-tables I was able to auth as root and grant privileges to 'root'@'localhost' & 'root'@'%' then afterwards successfully connect the app to the db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants