New install of BookStack is not creating database tables #3216

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

Originally created by @RockFoundries on GitHub (Sep 27, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I have seen a GitHub issue from a couple of weeks ago regarding issues with updating BookStack & databases, not sure if it's related

I've just installed BookStack using the manual instructions. I of course created a blank database with a user and added the details into the .env file. I can confirm the details are correct, as I can login with MySQL and create a table in the bookstack database without issue

However, when I go to connect to BookStack in the browser for the first time, it errors (500) and I get a big load of errors in the Laravel log about tables not being found. I've looked around to see if I need to manually create the tables or something, but no information on such, nor on this particular error

Exact BookStack Version

v22.09.1

Log Content

Truncated log as it's 4000 lines, The first few lines are the most important parts I'd assume

[2022-09-27 16:07:16] production.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bookstack.settings' doesn't exist (SQL: select * from `settings` where `setting_key` = app-public limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bookstack.settings' doesn't exist (SQL: select * from `settings` where `setting_key` = app-public limit 1) at /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)
[stacktrace]
#0 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\\Database\\Connection->runQueryCallback()
...[TRUNCATED]
#9 /var/www/BookStack/app/Settings/SettingService.php(245): Illuminate\\Database\\Eloquent\\Builder->first()
#10 /var/www/BookStack/app/Settings/SettingService.php(100): BookStack\\Settings\\SettingService->getSettingObjectByKey()

PHP Version

8.1

Hosting Environment

Ubuntu 22.04, Apache2, MariaDB on same server

Originally created by @RockFoundries on GitHub (Sep 27, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario I have seen a [GitHub issue](https://github.com/BookStackApp/BookStack/issues/3714) from a couple of weeks ago regarding issues with updating BookStack & databases, not sure if it's related I've just installed BookStack using the manual instructions. I of course created a blank database with a user and added the details into the .env file. I can confirm the details are correct, as I can login with MySQL and create a table in the bookstack database without issue However, when I go to connect to BookStack in the browser for the first time, it errors (500) and I get a big load of errors in the Laravel log about tables not being found. I've looked around to see if I need to manually create the tables or something, but no information on such, nor on this particular error ### Exact BookStack Version v22.09.1 ### Log Content Truncated log as it's 4000 lines, The first few lines are the most important parts I'd assume ``` [2022-09-27 16:07:16] production.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bookstack.settings' doesn't exist (SQL: select * from `settings` where `setting_key` = app-public limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bookstack.settings' doesn't exist (SQL: select * from `settings` where `setting_key` = app-public limit 1) at /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712) [stacktrace] #0 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\\Database\\Connection->runQueryCallback() ...[TRUNCATED] #9 /var/www/BookStack/app/Settings/SettingService.php(245): Illuminate\\Database\\Eloquent\\Builder->first() #10 /var/www/BookStack/app/Settings/SettingService.php(100): BookStack\\Settings\\SettingService->getSettingObjectByKey() ``` ### PHP Version 8.1 ### Hosting Environment Ubuntu 22.04, Apache2, MariaDB on same server
OVERLORD added the 🐕 Support label 2026-02-05 06:09:59 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3216