Missing DB Table after installation #2398

Closed
opened 2026-02-05 03:57:34 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @theDigitalViking on GitHub (Sep 21, 2021).

I installed Bookstack as described on the website under manual installation.
After I migrated the database, I wanted to log in with the user "admin@admin.com". I got an error message. That's why I turned on the debug mode.
I got only a white page in the browser. Using the developer tools in Chrome I could see the following error message:

Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'archivo-nehemar.mfa_values' doesn't exist

What could be the reason?

Originally created by @theDigitalViking on GitHub (Sep 21, 2021). I installed Bookstack as described on the website under manual installation. After I migrated the database, I wanted to log in with the user "admin@admin.com". I got an error message. That's why I turned on the debug mode. I got only a white page in the browser. Using the developer tools in Chrome I could see the following error message: Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'archivo-nehemar.mfa_values' doesn't exist What could be the reason?
OVERLORD added the 🐕 Support label 2026-02-05 03:57:34 +03:00
Author
Owner

@theDigitalViking commented on GitHub (Sep 21, 2021):

The database doesn't exist, because the migration crashes because of the following errors:

Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table joint_permissions add primary key joint_primary(role_id, entity_type, entity_id, action))

at C:\wamp64\www\BookStack\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {

669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

@theDigitalViking commented on GitHub (Sep 21, 2021): The database doesn't exist, because the migration crashes because of the following errors: Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `joint_permissions` add primary key `joint_primary`(`role_id`, `entity_type`, `entity_id`, `action`)) at C:\wamp64\www\BookStack\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will make this exception a 667| // lot more helpful to the developer instead of just the database's errors. 668| catch (Exception $e) { > 669| throw new QueryException( 670| $query, $this->prepareBindings($bindings), $e 671| ); 672| } 673|
Author
Owner

@ssddanbrown commented on GitHub (Sep 23, 2021):

Hi @bitmonx,
It's strange to get that error, The key content should be nowhere near the 1000 bytes limited mentioned by your system.
Could you confirm the following:

  • What exact MySQL version is in use here?
  • What operating system is MySQL running on?
  • Is this a completely fresh install?
@ssddanbrown commented on GitHub (Sep 23, 2021): Hi @bitmonx, It's strange to get that error, The key content should be nowhere near the 1000 bytes limited mentioned by your system. Could you confirm the following: - What exact MySQL version is in use here? - What operating system is MySQL running on? - Is this a completely fresh install?
Author
Owner

@AliHosseiniG commented on GitHub (Sep 27, 2021):

I have installed everything but there is a error at DB creation:

Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table joint_permissions add primary key joint_primary(role_id, entity_type, entity_id, action))

at C:\wamp64\www\BookStack\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {

669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
@AliHosseiniG commented on GitHub (Sep 27, 2021): I have installed everything but there is a error at DB creation: Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table joint_permissions add primary key joint_primary(role_id, entity_type, entity_id, action)) at C:\wamp64\www\BookStack\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will make this exception a 667| // lot more helpful to the developer instead of just the database's errors. 668| catch (Exception $e) { 669| throw new QueryException( 670| $query, $this->prepareBindings($bindings), $e 671| ); 672| } 673|
Author
Owner

@ssddanbrown commented on GitHub (Sep 28, 2021):

@oseadbashi I'd need answers to my previous message above since your error appears to be the same.

@ssddanbrown commented on GitHub (Sep 28, 2021): @oseadbashi I'd need answers to my previous message above since your error appears to be the same.
Author
Owner

@AliHosseiniG commented on GitHub (Sep 28, 2021):

@ssddanbrown
Hi,

Windows 10,
I have installed, Wampserver 3.2.0 (PHP 7.4.9 and MySQL 8.0.21) & python 3.9.7 & node.js 14.17.6
Yes, it is a fresh install

@AliHosseiniG commented on GitHub (Sep 28, 2021): @ssddanbrown Hi, Windows 10, I have installed, Wampserver 3.2.0 (PHP 7.4.9 and MySQL 8.0.21) & python 3.9.7 & node.js 14.17.6 Yes, it is a fresh install
Author
Owner

@ssddanbrown commented on GitHub (Sep 29, 2021):

I'm assuming this post is still relevant:
http://forum.wampserver.com/read.php?2,137100,137101

If so, it's due to WAMP creating databases with the old MYISAM engine by default.
Might need to do something like this or convert the existing database to InnoDB. I don't use WAMPserver myself though so not sure how the database is managed to provide guidance on this.

@ssddanbrown commented on GitHub (Sep 29, 2021): I'm assuming this post is still relevant: http://forum.wampserver.com/read.php?2,137100,137101 If so, it's due to WAMP creating databases with the old MYISAM engine by default. Might need to do [something like this](https://stackoverflow.com/questions/33927804/change-storage-engine-from-innodb-to-myisam-in-wamp-server) or convert the existing database to InnoDB. I don't use WAMPserver myself though so not sure how the database is managed to provide guidance on this.
Author
Owner

@ssddanbrown commented on GitHub (Oct 16, 2021):

Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Oct 16, 2021): Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2398