Access denied for user 'photoview'@'tcp(db)' while using Docker compose #447
Replies: 7 comments 8 replies
-
I can't see exactly why the database connection fails, did you change the environment variables after creating the containers initially? Also is there a particular reason why you changed the default database environment variables? Remember to delete the volumes if you change your config with |
Beta Was this translation helpful? Give feedback.
-
Well i could 100% back up bhm .... it simply fails at exactly the steps already mentioned. |
Beta Was this translation helpful? Give feedback.
-
This is half year old already but I hope I can add anything to this. Today I also got this error and the UI bugged out of its life. For some reason some other containers also suffered from this, and I went to check their logs on portainer. Turns out that if using the default configuration while other containers also use their own mysql database, there's some cross talk between the db containers, hence the unauthorized user (doesn't exist in the other instances). To solve this I changed the docker-compose.yml to use the container_name parameter in the db section and then used the name in PHOTOVIEW_MYSQL_URL variable:
I hope this helps :) |
Beta Was this translation helpful? Give feedback.
-
@viktorstrate why haven't you added artfer's solution to the official yaml file? Photoview is unusable without it. |
Beta Was this translation helpful? Give feedback.
-
Tried the fix from artfer above, still no luck on a clean install:
|
Beta Was this translation helpful? Give feedback.
-
Did anybody ever have any luck with this? I tried Photoview the other day. Immediately after launching it I realized I was using the default password so I changed it and recreated it. Ever since I've had no success in getting them to launch as I'm consistently getting error 1045. I've done prunes, deleted containers, deleted volumes, recreated them, etc etc. Also tried the fix noted above but no dice. At this point I'm not sure what else I can do to stand up Photoview. If anybody has any ideas so I can try this app out I'd greatly appreciate it. |
Beta Was this translation helpful? Give feedback.
-
If this is an issue for some of you still, please try the config from PR #863 - it is well-documented and I hope that it will fix this issue for you as well as many other ones. |
Beta Was this translation helpful? Give feedback.
-
Description
Current
docker-compose.example.yml
and instructions in repository do not allow to easily deploy an instance.To Reproduce
Steps to reproduce the behavior:
docker
groupdocker
dir inphotoview
user home directory.docker-compose.yml
file with contents (Environments section)docker-compose up -d
Expected behavior
docker compose deploys a working instance
Actual
root
,photoview
,root@%
,photoview@%
,root@CONTAINER_IP
,photoview@CONTAINER_ID
is accessble after dropping into containers shell.Environments
This was tested across two different machines. Armbian Buster on an arm64 board and Debian Buster on an amd64 platform.
Armbian Docker
Debian Docker
docker-compose.yml
Error Log: Database
Error Log: App
Additional context
MYSQL_
orMARIADB_
prefix in params has no bearing on results.Beta Was this translation helpful? Give feedback.
All reactions