Skip to content

[Bug]: Inconsistent MYSQL connection string requirements #560

Description

@hibare

What steps did you take and what happened:

If we are using external MySQL and pass connection string as ARCHIVISTA_SQL_STORE_CONNECTION_STRING=root:example@db/testify will result in app startup error

archivista-1  | May 14 10:32:49.581 [INFO] SQLStoreConnectionString: root:example@db/testify
archivista-1  | May 14 10:32:49.581 [INFO] SQLStoreBackend: MYSQL
archivista-1  | May 14 10:32:49.581 [FATA] could not create ent client: could not parse mysql connection string: default addr for network 'db' unknown

And if we decide to pass connection string as root:example@tcp(db)/testify will result in atlas failure.

archivista-1  | Running migrations for MySQL
archivista-1  | ARCHIVISTA_SQL_STORE_CONNECTION_STRING: root:example@tcp(db)/testify
archivista-1  | Error: mysql: query system variables: dial tcp: lookup tcp(db): no such host
archivista-1  | Failed to apply migrations

What did you expect to happen:
When connection string is set as ARCHIVISTA_SQL_STORE_CONNECTION_STRING=root:example@db/testify, expect normal app startup

Anything else you would like to add:

There is an open issue on mysql driver repo go-sql-driver/mysql#1074 for same.

Environment:

  • Witness version:
  • Architecture:
  • Attestors used:
  • Archivista version:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions