Skip to content

Cannot use ipv6 for DB_HOST value #5464

@rosalina-ha

Description

@rosalina-ha

Describe the Bug

When trying to set DB_HOST to use an IPv6, you can't run php artisan migrate

Steps to Reproduce

  1. Clone repository
  2. Configure .env DB_HOST to use an ipv6
  3. Execute php artisan migrate

Expected Behaviour

Work with an IPv6 for the DB_HOST value

Screenshots or Additional Context

Error message :

In Connection.php line 829:

  SQLSTATE[HY000] [2002] Failed to parse IPv6 address "[2a00:XXXX" (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`
  , table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'bookstack' and table_ty
  pe in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)


In Connector.php line 65:

  SQLSTATE[HY000] [2002] Failed to parse IPv6 address "[2a00:XXXX"

DB_HOST value use: [2a00:XXXX:XXXX:XXX::dba2]

Browser Details

No response

Exact BookStack Version

v24.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions