How Fix Issue #5244

Closed
opened 2026-02-05 09:51:06 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @Parfenov-Sergei on GitHub (Apr 4, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

This is the first time I have tried to install BookStack in a Linux VM. I have installed all the required packages, such as Ngnix, PHP, etc. I downloaded BookStack and ran composer install. No issue was found; everything went well. I updated the .env file with the database information below. Then, I ran "php artisan key:generate," and it generated a key. When I ran "php artisan migrate," I got a QueryEception error. I am using the MySQL database.

In Connection.php line 825:

SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES) (Connection:
mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstack' and t
able_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as exists)

In Connector.php line 66:

SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES)

Please help, how I can Fix this errors ?

Exact BookStack Version

v25.02.2

Log Content

In Connection.php line 825:

SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES) (Connection:
mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstack' and t
able_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as exists)

In Connector.php line 66:

SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES)

But if I try mysql -u bookstack bookstack -p , I successfully connected to database

Hosting Environment

OS like Debian, Bookstack version v25.02.2
PHP 8.2.24

Originally created by @Parfenov-Sergei on GitHub (Apr 4, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario This is the first time I have tried to install BookStack in a Linux VM. I have installed all the required packages, such as Ngnix, PHP, etc. I downloaded BookStack and ran composer install. No issue was found; everything went well. I updated the .env file with the database information below. Then, I ran "php artisan key:generate," and it generated a key. When I ran "php artisan migrate," I got a QueryEception error. I am using the MySQL database. In Connection.php line 825: SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES) (Connection: mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstack' and t able_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as `exists`) In Connector.php line 66: SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES) Please help, how I can Fix this errors ? ### Exact BookStack Version v25.02.2 ### Log Content In Connection.php line 825: SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES) (Connection: mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstack' and t able_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as `exists`) In Connector.php line 66: SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'localhost' (using password: YES) But if I try mysql -u bookstack bookstack -p , I successfully connected to database ### Hosting Environment OS like Debian, Bookstack version v25.02.2 PHP 8.2.24
OVERLORD added the 🐕 Support label 2026-02-05 09:51:06 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Apr 4, 2025):

Hi @Parfenov-Sergei,
Does the database password used contain any special characters? Specifically spaces or hashes?

@ssddanbrown commented on GitHub (Apr 4, 2025): Hi @Parfenov-Sergei, Does the database password used contain any special characters? Specifically spaces or hashes?
Author
Owner

@Parfenov-Sergei commented on GitHub (Apr 4, 2025):

Yes, contain '$' and '#'

@Parfenov-Sergei commented on GitHub (Apr 4, 2025): Yes, contain '$' and '#'
Author
Owner

@ssddanbrown commented on GitHub (Apr 5, 2025):

Thanks for confirming, In that case you'll need to quote your values, like:

DB_PASSWORD="a#b$c#d"
@ssddanbrown commented on GitHub (Apr 5, 2025): Thanks for confirming, In that case you'll need to quote your values, like: ```bash DB_PASSWORD="a#b$c#d" ```
Author
Owner

@ssddanbrown commented on GitHub (May 9, 2025):

Since there's been no further follow-up on this I'll go ahead and close it off.

@ssddanbrown commented on GitHub (May 9, 2025): Since there's been no further follow-up on this I'll go ahead and close it off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5244