1

I build my Home-Server on a raspberry pi and wanted to install nextcloud with Docker on it. But nextcloud don't find the mariadb.

What's wrong?

  db:
    image: jsurf/rpi-mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci    
    volumes:
      - /media/data/mySQL:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=Foo12345
      - MYSQL_PASSWORD=Foo123
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud


  nextcloud:
    image: nextcloud:apache
    volumes:
      - /media/data/nextCloud:/var/www/html/data
    links:
      - db
    environment:
      - MYSQL_ROOT_PASSWORD=Foo12345
      - MYSQL_PASSWORD=Foo123
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
    labels:
      - "traefik.frontend.rule=Host:cloud.domain.com"

NextCloud starts but if I try to set the admin-User comes the Error: enter image description here

The Container of the mariadb has the IP 172.21.0.4 so I think there is somthing wrong with the link. But what?

(172.21.0.5 is the IP of the NextCloud-Container)

Baum
  • 95
  • 10

2 Answers2

0

I had to execute this on mysql (mariadb) CLI in order to finalise the installation:

CREATE USER 'nextcloud'@'nextcloud-app.nextcloud_app-tier' IDENTIFIED BY 'nextcloud';
GRANT ALL PRIVILEGES ON nextcloud. * TO 'nextcloud'@'nextcloud-app.nextcloud_app-tier' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Where:

  • nextcloud-app, is the name for the nextcloud container
  • nextcloud_app-tier, is the docker network used

It may help others.

Sources:

https://blog.ssdnodes.com/blog/installing-nextcloud-docker/

https://askubuntu.com/questions/763336/cannot-enter-phpmyadmin-as-root-mysql-5-7

Alex
  • 124
  • 1
  • 12
0

I resolved the problem by changing the user and root password by removing strange characters like _:\

tropappar
  • 141
  • 1
  • 5