Skip to content

Use MariaDB database via socket #1284

Closed

Description

Hello,
I'm trying to get nextcloud to use my mariadb database by using a unix socket instead of a port but I get the following error:

Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

My docker-compose file contains the following:

version: '3.1'
services:
  nextcloud:
    image: nextcloud
    ports:
      - 8080:80
    volumes:
      - /var/run/mysqld/mysqld.sock:/var/run/mysql/mysqld.sock
    environment:
      MYSQL_DATABASE: 'nextcloud'
      MYSQL_USER: 'nextcloud'
      MYSQL_PASSWORD: '*********'
      MYSQL_HOST: '/var/run/mysqld/mysqld.sock'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions