Giter Club home page Giter Club logo

Comments (2)

andrii-suse avatar andrii-suse commented on July 26, 2024

fyi (not sure why) it happens at least on Debian 11, but not on openSUSE Leap.
Ah, on Leap the error is shown later, when you try to use client:

mariadb -V
mariadb: Can't read dir of '/etc/my.cnf.d' (Errcode: 2 "No such file or directory")

from mysql-formula.

SkypLabs avatar SkypLabs commented on July 26, 2024

I just hit this issue and did some work investigating it. It turns out a simple workaround exists:

# Pillar data.
mysql:
  config_directory: /etc/mysql

The configuration directory is only created if the config_directory entry is present in the pillar data:

{%- if "config_directory" in mysql %}
mysql_config_directory:
file.directory:
- name: {{ mysql.config_directory }}
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %}
- user: root
- group: root
- mode: 755
{%- endif %}
- makedirs: True

The problem comes from the absence of a default value for Debian:

Debian:
service: mysql

Unlike CentOS and Fedora (lines 19 and 35):

CentOS:
config_directory: /etc/my.cnf.d/
server_config:
file: server.cnf
sections:
mysqld_safe:
log_error: /var/log/mysql/mysqld.log
pid_file: /var/run/mysql/mysqld.pid
mysqld:
socket: /var/lib/mysql/mysql.sock
bind_address: 127.0.0.1
Fedora:
serverpkg: mariadb-server
clientpkg: mariadb
service: mariadb
pythonpkg: python2-mysql
config_directory: /etc/my.cnf.d/

I have only tested this workaround on Debian 11 so far.

from mysql-formula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.