Skip to content

[Bug]: MariaDB fails to start #1531

@patreeceeo

Description

@patreeceeo

Current Behavior (bug)

First, this project looks fantastic, thanks for working on it. I really want it to work...

Starting maria from the devbox shell

devbox shell
mariadb

yields

2023-10-04 15:58:09 0 [ERROR] mariadbd: Can't create/write to file './ddl_recovery.log' (Errcode: 13 "Permission denied")
2023-10-04 15:58:09 0 [ERROR] DDL_LOG: Failed to create ddl log file: ./ddl_recovery.log
2023-10-04 15:58:09 0 [ERROR] Aborting

The same error can be found in the devbox services up window.

I've tried overriding default options, adding one after another, getting new errors each time and hit the limit of my maria/google abilities with:

mariadbd --log-ddl-recovery=$(pwd)/ddl.log --aria-log-dir-path=$(pwd)/.devbox/virtenv/mariadb/run/aria --innodb-data-file-path=$(pwd)/.devbox/virtenv/mariadb/data/ibdata1:12M --innodb-temp-data-file-path=$(pwd)/.devbox/virtenv/mariadb/data/ibtmp1:12M

which yields

2023-10-04 16:03:29 0 [Warning] Can't create test file /var/lib/mysql/patrick-Blade-Pro-17-Fall-2019.lower-test
2023-10-04 16:03:29 0 [Note] Starting MariaDB 11.0.3-MariaDB source revision 70905bcb9059dcc40db3b73bc46a36c7d40f1e10 as process 539331
2023-10-04 16:03:29 0 [Note] InnoDB: Compressed tables use zlib 1.3
2023-10-04 16:03:29 0 [Note] InnoDB: Number of transaction pools: 1
2023-10-04 16:03:29 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-10-04 16:03:29 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2023-10-04 16:03:29 0 [Note] InnoDB: Completed initialization of buffer pool
2023-10-04 16:03:29 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2023-10-04 16:03:29 0 [ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
2023-10-04 16:03:29 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-10-04 16:03:29 0 [Note] InnoDB: Starting shutdown...
2023-10-04 16:03:29 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-10-04 16:03:29 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-10-04 16:03:29 0 [Note] Plugin 'wsrep-provider' is disabled.
2023-10-04 16:03:29 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
2023-10-04 16:03:29 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-10-04 16:03:29 0 [ERROR] Aborting

I've tried other ideas too, this was just the direction that seemed the most promising to me.

Expected Behavior (fix)
The MariaDB server daemon should start.

Additional context
devbox version:

Version:     0.6.0
Platform:    linux_amd64
Commit:      fdbd72f230b3520dde60d72c57d9460922ade656
Commit Time: 2023-10-03T18:04:08Z
Go Version:  go1.21.1
Launcher:    0.2.0

my devbox.json file:

{
  "packages": [
    "php@latest",
    "apache@latest",
    "mariadb@latest"
  ],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Merged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions