Closed KillerTic closed 1 year ago
This is something we can't reproduce. I tried many different passwords and it always works. Please share a password you identified as not working so we can reproduce and then we can fix it. Thanks
So I just did some more test runs and can confirm, that DB_PASS is working, but it isn't when there is a "&" in the password (like this password isn't working: "MySecr3t&Passwd") I tried some other characters ("!", captial letters, lower case and numbers). All worked. "-" actually never threw me an "Access denied", but also the login page never loaded... Not sure if this was my browser cache or another problem.
Not sure which other special characters make a problem.
Hope this helps you debugging.
Kindly address this issue, and at least in the mean time update the documentation on dockerhub.com, specifically, instruct users to use DB_USERNAME and DB_PASSWORD instead of DB_USER and DB_PASS (as shown there in the example docker-compose.yml file). It is not a pleasant experience to have to track down this issue, as the error one first sees in from 'docker logs ...` leads one to think there is actually a problem with mysql permissions themselves (which, as well known, can be wonky) rather than the fact that the mysql user within the container is simply connecting with incorrect credentials (i.e., from DB_USER but apparently not using DB_PASS).
Specifically, I am referring to the fact that one sees the following in the docker logs ...
output upon a new install when one only sets DB_USER and DB_PASS within docker-compose.yml:
....
Waiting for DB to be available
Illuminate\Database\QueryException
SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.27.0.6' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE')
at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }
....
@KillerTic thanks so much for letting us know. The issue is with sed and &
on the replace side, where it's interpreted as match everything from the left side
, even if it's part of an env var. We'll get a fix out shortly.
Happy to have helped!
Hello everyone. I have repulled the image, because we had this issue too.
The same error come with the new issue. How i can solve this issue?
Error in bookstack container:
Running config - DB_HOST set **** Insert DB_PORT='3306' into /config/www/.env **** Waiting for DB to be available 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 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712 708▕ // If an exception occurs when attempting to run a query, we'll format the error 709▕ // message to include the bindings with SQL, which will make this exception a 710▕ // lot more helpful to the developer instead of just the database's errors. 711▕ catch (Exception $e) { ➜ 712▕ throw new QueryException( 713▕ $query, $this->prepareBindings($bindings), $e 714▕ ); 715▕ } 716▕ } +33 vendor frames 34 /app/www/artisan:37 Illuminate\Foundation\Console\Kernel::handle() cont-init: info: /etc/cont-init.d/50-config exited 0
Is there an existing issue for this?
Current Behavior
Tried setting up Bookstack with MariaDB following the guide here. Boockstack container is not able to connect to the MariaDB container with an access denied error.
After many different attempts and finding the closed bug #129 could get it running, when setting the DB_PASSWORD variable.
Expected Behavior
As per documentation the DB_PASS variable should work. Either it is not being handled correctly or the documentation needs to be updated to DB_PASSWORD
Steps To Reproduce
Environment Docker: Docker version 20.10.22, build 3a2c30b Docker Compose: Docker Compose version v2.14.1
Code
Run
sudo docker compose up -d
Error
Access denied for user 'bookstack'@'IPADDRESS' (using password: YES)
Environment
CPU architecture
x86-64
Docker creation
Container logs
Boockstack MariaDB Container