linuxserver / docker-mariadb

GNU General Public License v3.0
212 stars 46 forks source link

Failed to load slave replication 1017 #117

Closed mariushosting closed 1 year ago

mariushosting commented 1 year ago

Is there an existing issue for this?

Current Behavior

I want to run the linuxserver mariaDB image into the docker compose and skip the log bin using:

command:

This will work with the original mariaDB but not with the mariaDB from linuxserver.

Is there any issue with the image?

[Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")

Expected Behavior

No response

Steps To Reproduce

Install the mariadb linuxserver and always get [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")

this can be solved by adding in the docker compose

command:

this will work with the original mariaDB but not with the mariaDB from linuxserver

Environment

- OS: Synology NAS DSM 7.1.1
- Portainer stack installation.

CPU architecture

x86-64

Docker creation

version: "3.9"
services:
  db:
    image: linuxserver/mariadb
    container_name: maria
    hostname: maria-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD-SHELL", "mysqladmin ping -P 3306 -psuper-duper-strong-pass | grep 'mysqld is alive' || exit 1"]
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Europe/Bucharest
      - MYSQL_ROOT_PASSWORD=super-duper-strong-pass
      - MYSQL_DATABASE=marius_vault
      - MYSQL_USER=marius
      - MYSQL_PASSWORD=mariusmarius
    volumes:
      - /volume1/docker/mariadb:/config
    restart: always

Container logs

custom-init] No custom services found, skipping...
[migrations] started
[migrations] no migrations found
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    1026
User gid:    100
-------------------------------------
Setting Up Initial Databases
Installing MariaDB/MySQL system tables in '/config/databases' ...
2023-01-16 19:09:50 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
github-actions[bot] commented 1 year ago

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

thespad commented 1 year ago

Use the custom.cnf in /config to specify server settings, we don't currently support command line options on this image.

lucasoeth commented 1 year ago

@mariushosting I had an issue with this container as well with privileges and I noticed that you added

` security_opt:

which fixed the permission issues I had. I looked online but I could not find a lot of applicable information for this scenario. Could you elaborate why we need to add it? Why do other (linuxserver) containers work without needing to add the option?

Thanks

big fan of the blog btw!

github-actions[bot] commented 1 year 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.

github-actions[bot] commented 1 year ago

This issue is locked due to inactivity