Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SQL error attempting to create table "migration" #209

Closed
1 task done
bobbyl140 opened this issue Mar 19, 2024 · 2 comments
Closed
1 task done

[BUG] SQL error attempting to create table "migration" #209

bobbyl140 opened this issue Mar 19, 2024 · 2 comments

Comments

@bobbyl140
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The database returns an error as the table isn't successfully created, and loading the webpage shows a blank screen.

Expected Behavior

The table should be created and the server should start up fully.

Steps To Reproduce

  1. In a fresh Rocky Linux 9 install, use the built-in Podman to run Bookstack with files from a working install.
  2. View the logs, observe the error.

Environment

- OS: Rocky Linux 9.3
- How docker service was installed: Through distro's package manager, but using Podman as a wrapper
- I had a *fully working* instance, but I need to move it to a new host. This error didn't occur before. There's very much a possibility it's my fault, but I've seen a few other issues like this with migration such as #203 and #206.

CPU architecture

x86-64

Docker creation

version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=https://bookstack.example.com
      - APP_PROXIES=*
      - DB_HOST=host.containers.internal # MySQL runs on the host
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=                    # Redacted
      - DB_USERNAME=bookstack.      # Wasn't sure which to use
      - DB_PASSWORD=                # ^
      - DB_DATABASE=bookstack
    volumes:
      - /root/bookstack/config:/config
    ports:
      - 6875:80
    extra_hosts:
      - "host.containers.internal:10.0.0.3" # MySQL runs on the host (10.0.0.3)
    restart: unless-stopped

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available

   INFO  Preparing database.

  Creating migration table .......................................... 2ms FAIL

   Illuminate\Database\QueryException

  SQLSTATE[HY000]: General error: 1005 Can't create table `bookstack`.`migrations` (errno: 13 "Permission denied") (SQL: create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(191) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

  at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }

      +40 vendor frames
  41  /app/www/artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2023-12-25 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@bobbyl140
Copy link
Author

My fault, sorry!

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant