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

Access to database is denied #2246

Closed
krispek opened this issue Feb 9, 2019 · 5 comments
Closed

Access to database is denied #2246

krispek opened this issue Feb 9, 2019 · 5 comments

Comments

@krispek
Copy link

krispek commented Feb 9, 2019

I run FreshRSS and MySQL both in Docker on my NAS. This issue occurred when I upgraded both of them using Watchtower. Both were minor upgrades, so I suspected no issues.

Situation;
MySQL: 8.0.15 (upgraded from 8.0.12 of 8.0.13)
FreshRSS: 1.13.1 (upgraded from 1.12)

Both are running in (separate) Docker containers. To overcome another login issue, I use 'caching_sha2_password' authentication method.

After upgrading, I got this error after logging in (the login page works):

Application problem

See logs files

The error message itself states:

PHP message: PHP Fatal error: Uncaught Minz_PDOConnectionException: Access to database is denied for freshrss (mysql:host=mysql;dbname=freshrss;charset=utf8mb4) in /config/www/freshrss/lib/Minz/ModelPdo.php:95
Stack trace:
#0 /config/www/freshrss/app/Models/Factory.php(27): Minz_ModelPdo->__construct('username')
#1 /config/www/freshrss/p/api/fever.php(168): FreshRSS_Factory::createEntryDao()
#2 /config/www/freshrss/p/api/fever.php(186): FeverAPI->authenticate()
#3 /config/www/freshrss/p/api/fever.php(595): FeverAPI->isAuthenticatedApiUser()
#4 {main}
thrown in /config/www/freshrss/lib/Minz/ModelPdo.php on line 95" while reading response header from upstream, client: 172.17.0.1, server: _, request: "POST /api/fever.php/?api&unread_item_ids HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.2:9200"

This of course relates to the FeverAPI I make use of, but for logging in itself I could not find an error so far.

This seems to be related to the database, but I can't find out how.

  • My initial research led to CentOS 6.8 MySQL: Access to database is denied #1474 and thus to the encoding set, but I verified that the character set is indeed utf8mb4.
  • I changed the login method back to mysql_native_password, but that did not have any immmediate effect, so I reverted it.

Does anybody have an idea?

@Alkarex
Copy link
Member

Alkarex commented Mar 9, 2019

Hello @krispek and sorry for the delay.
I am not familiar with the system you are running on. I do not think this is an issue with FreshRSS, but more about networking and/or access rights between your two containers. From within the FreshRSS container, can you successfully ping your mysql container?
If you do not succeed in doing the MySQL configuration, you can revert to using the built-in SQLite database.

@aledeg
Copy link
Member

aledeg commented Mar 16, 2019

@krispek Do you mean you have a docker container running the database and a docker container running the code with your web server?

@krispek
Copy link
Author

krispek commented Mar 19, 2019

@aledeg Yep.

I solved it in the end by running Firefly from another source (I initially ran it via linuxserver, now I use the freshrss/freshrss-version). And I changed the authentication method to the default version again. :)

@aledeg
Copy link
Member

aledeg commented Mar 19, 2019

So maybe your containers are not on the same network. I am not sure how to verify that though.

You mentioned that your problem is solved. Should we close the current issue?

@Alkarex
Copy link
Member

Alkarex commented Mar 19, 2019

Let's close, and re-open if needed :-)

@Alkarex Alkarex closed this as completed Mar 19, 2019
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

3 participants