Closed spudsmac closed 3 years ago
The vars are DB_USER and DB_PASS as listed in the readme https://github.com/linuxserver/docker-bookstack/blob/master/root/etc/cont-init.d/50-config#L51
According the issue here: https://discourse.linuxserver.io/t/bookstack-database-issues/1421
This seems to be not only happening in Rasberry Pi.
I am able to fix the issue by changing the environment variable DB_PASS
to DB_PASSWORD
.
Anything thing to point out: I wasn't able to connect to the DB via 127.0.0.1
or localhost
, instead the internal IP of the docker host is used.
If you fill out the issue template, we can take a look. Otherwise, we can't help
DB_PASS
should work for first boot as that value will be used in the copied/generated .env
file.
If you then need to use a different (Non-database_user_password
-default) value then the DB_PASS
value won't take affect since the .env
file has already been created (Assuming the config path is passed as a persistent volume which will be most cases) and since the script looks for the old default value.
Setting DB_PASSWORD
works around this by overriding the .env
file value from BookStack's perspective. Alternatively you could instead directly alter the .env
file as documented in the readme.
Can't immediately think of a way to alter the script without breaking someone's setup, No rush to do so though since it can be worked around.
Either way, Always remember to follow the issue template.
I am embarrassed, but not too not embarrassed to bring up my own two issues in which I angrily argued the exact same thing.
They may shed some light on this issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
New to github but I spent hours racking my brain over getting the application to be able to log in to the database. Turns out the image for the database for raspberry pi armv7 should be mariadb and the env variable for password should be DB_PASSWORD not DB_PASS. Figured I would pass along this information in case other people are having this issue. Sorry it's not in the right format but if you close out this issue it should be searchable.
This is the error I was getting before making the change.
Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE')
at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES)")
2 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES)")
Please use the argument -v to see more details.