Access denied in DB while migrating from any Docker image version over 22.04 #3514

Closed
opened 2026-02-05 06:56:58 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @fabionzn on GitHub (Feb 16, 2023).

Describe the Bug

Hi there @ssddanbrown
not sure if I will contribute or just mess it up more. I got this issue trying to figure out if migrating to a newer docker image version might fix an Azure AD problem. During the migration process return the following message:

Starting Migration...

   Illuminate\Database\QueryException

  SQLSTATE[HY000] [1045] Access denied for user 'book_user'@'REMOTE_IP' (using password: YES) (SQL: select * from information_schema.tables where table_schema = book_db and table_name = migrations and table_type = 'BASE TABLE')

  at 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  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

As far as I was able to understand the problem was related that are missing clauses in table_schema and table_name on that SELECT. Running the following query works.
select * from information_schema.tables where table_schema = 'book_db' and table_name = 'migrations' and table_type = 'BASE TABLE'

So MAYBE add clauses might solve this. By the way, this user has no root power neither can be done since run over a SaaS MySQL in Azure.

Steps to Reproduce

  1. Create a instance using solidnerd/bookstack:22.04 that create a DB in MySQL
  2. Create a new instance using any newer Docker image version connecting at same database

Expected Behaviour

Not sure, but I might believe that the migration might run ok or at least starts correctly.

Screenshots or Additional Context

imagem_2023-02-16_152114901

Browser Details

No response

Exact BookStack Version

= 22.04.02

PHP Version

No response

Hosting Environment

Docker image

Originally created by @fabionzn on GitHub (Feb 16, 2023). ### Describe the Bug Hi there @ssddanbrown not sure if I will contribute or just mess it up more. I got this issue trying to figure out if migrating to a newer docker image version might fix an Azure AD problem. During the migration process return the following message: ``` Starting Migration... Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'book_user'@'REMOTE_IP' (using password: YES) (SQL: select * from information_schema.tables where table_schema = book_db and table_name = migrations and table_type = 'BASE TABLE') at 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 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) ``` As far as I was able to understand the problem was related that are missing clauses in table_schema and table_name on that SELECT. Running the following query works. `select * from information_schema.tables where table_schema = 'book_db' and table_name = 'migrations' and table_type = 'BASE TABLE'` So MAYBE add clauses might solve this. By the way, this user has no root power neither can be done since run over a SaaS MySQL in Azure. ### Steps to Reproduce 1. Create a instance using solidnerd/bookstack:22.04 that create a DB in MySQL 2. Create a new instance using any newer Docker image version connecting at same database ### Expected Behaviour Not sure, but I might believe that the migration might run ok or at least starts correctly. ### Screenshots or Additional Context ![imagem_2023-02-16_152114901](https://user-images.githubusercontent.com/43587511/219453753-00133c66-f0e0-4c2a-8776-d28deff1fad8.png) ### Browser Details _No response_ ### Exact BookStack Version >= 22.04.02 ### PHP Version _No response_ ### Hosting Environment Docker image
OVERLORD added the 🐛 Bug label 2026-02-05 06:56:58 +03:00
Author
Owner

@fabionzn commented on GitHub (Feb 16, 2023):

Néh you can just ignore it... I discover right now that the dev that messes it up with our Bookstack pipeline put just half of the user database password. Sorry to bored you guys with our internal issues 😅

@fabionzn commented on GitHub (Feb 16, 2023): Néh you can just ignore it... I discover right now that the dev that messes it up with our Bookstack pipeline put just half of the user database password. Sorry to bored you guys with our internal issues 😅
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3514