linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
797 stars 109 forks source link

Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored...' at line 1 #85

Closed dawidmachon closed 3 years ago

dawidmachon commented 3 years ago

linuxserver.io


Expected Behavior

If procced with restore of database in docker similar to instruction: https://www.bookstackapp.com/docs/admin/backup-restore/ you should be able to import sql file.

Current Behavior

If procced with restore of database in docker similar to instruction: https://www.bookstackapp.com/docs/admin/backup-restore/ then you will recive error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored...' at line 1

Steps to Reproduce

  1. Make a dump of sql: sudo docker exec -it bookstack-db mysqldump -uroot -ppassword bookstack > bookstack.sql
  2. Try to import it: sudo docker exec -it bookstack-db /bin/sh -c "mysql -uroot -ppassword bookstack < bookstack.sql"
  3. Error shows up

Environment

OS: Docker/ Linux 5.10.0-0.bpo.3-amd64 #1 SMP Debian 5.10.13-1~bpo10+1 (2021-02-11) x86_64 GNU/Linux CPU architecture: x86_64 How docker service was installed:

OMV 5

Command used to create docker container (run/create/compose/screenshot)

version: "2"
services:

  bookstack-db:
    image: linuxserver/mariadb
    container_name: bookstack-db
    hostname: bookstack-db
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=100
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=bookstack
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=password

    volumes:
      - /srv/dev1212/dockerdisk/bookstack/bookstack-db-data:/config

  bookstack:
    image: linuxserver/bookstack
    container_name: bookstack
    hostname: bookstack
    restart: unless-stopped
    environment:
      - TZ=Europe/Warsaw
      - PUID=1000
      - PGID=100
      - APP_URL=https://mydomain.com
      - DB_HOST=bookstack-db
      - DB_USER=bookstack
      - DB_PASS=password
      - DB_DATABASE=bookstack

    depends_on:
      - bookstack-db
    volumes:
      - /srv/dev1212/dockerdisk/bookstack/bookstack-data:/config

Docker logs

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

homerr commented 3 years ago

Have you tried entering an interactive shell docker exec -ti $container_name bash and then issuing the commands from there after entering a MySQL CLI? mysql -u root -p

homerr commented 3 years ago

Going to close this off as no feedback. Find us in Discord if you need further help on this one