BookStack
BookStack copied to clipboard
SQLSTATE [HY000] [1045] Access Denied . . .
Attempted Debugging
- [X] I have read the debugging page
Searched GitHub Issues
- [X] I have searched GitHub for the issue.
Describe the Scenario
I complete the php artisan migrate step in the setup (following along to this video) https://youtu.be/_v-4BhVz7OI?si=LfSJo6uEtY-9v-qi
and get the following error.
I've lost track of how many video and KB articles I've read through trying to understand the remedy. Help
Exact BookStack Version
v24.05.1
Log Content
No response
Hosting Environment
PHP Version 8.2.12 using xampp v3.3.0 Apache MySQL
Hi @Charles349,
can you verify that the database credentials you have entered in your .env file are not the default examples and that they are correct? You can use mysql -u your_username -p for that purpose and check if you can log in successfully.
KR
Since there's been no further follow-up I'll go ahead and close this off.
Hello,
Could you guide me on how to provision bookstack container? Because right now I am getting this error: SQLSTATE[HY000] [1045] Access denied for user 'database_username'@'bookstack.bookstack_default'
How can this problem be solved?
Thanks.
This is my docker compose:
version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack environment: - PUID=1000 - PGID=1000 - TZ=Asia/Jakarta - APP_URL=http://localhost:6875 - APP_KEY=base64:yhvSgLkDaVgdMAN5464143zp54WCHXwAoTsfF99hUpE= - DB_HOST=bookstack_db - DB_USER=bookstack - DB_PASSWORD=pass - DB_DATABASE=bookstackapp volumes: - /bookstack/app:/config ports: - 6875:80 restart: unless-stopped depends_on: - bookstack_db bookstack_db: image: lscr.io/linuxserver/mariadb container_name: bookstack_db environment: - PUID=1000 - PGID=1000 - MYSQL_ROOT_PASSWORD=pass - TZ=Asia/Jakarta - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=pass volumes: - /bookstack/db:/config restart: unless-stopped
Error:
Waiting for DB to be available
Illuminate\Database\QueryException
SQLSTATE[HY000] [1045] Access denied for user 'database_username'@'bookstack.bookstack_default' (using password: YES) (Connection: mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstackapp' and table_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as exists)
at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:825
821▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
822▕ );
823▕ }
824▕
➜ 825▕ throw new QueryException(
826▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
827▕ );
828▕ }
829▕ }
+38 vendor frames
39 /app/www/artisan:35
Illuminate\Foundation\Console\Kernel::handle()
[custom-init] No custom files found, skipping...
[ls.io-init] done.
@cevinov You can find an up-to-date, complete and commented example of a compose stack here: https://codeberg.org/bookstack/devops/src/branch/main/config/lsio-docker/docker-compose.yml
Already solved thanks, using another mariaDB version