Project

General

Profile

Actions

Feature #44469

closed

Feature request: Support for MySQL/MariaDB database socket configuration

Added by Eugene Ku 2 days ago. Updated 2 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Resolution:
Invalid

Description

Hello,

I would like to suggest adding an option to configure a Unix socket for MySQL/MariaDB connections.

Currently, database configuration generally uses parameters such as:

DB_HOST
DB_PORT
DB_NAME
DB_USER
DB_PASS

It would be useful to have an additional option such as:

DB_SOCKET: /var/run/mysqld/mysqld.sock

When DB_SOCKET is defined, Redmine could use the Unix socket instead of TCP/IP for the database connection.

This would be particularly useful for Docker/container deployments where MariaDB/MySQL is running on the same host and the database socket can be securely mounted into the container.

For example:

DB_TYPE: mysql
DB_SOCKET: /var/run/mysqld/mysqld.sock
DB_NAME: redmine
DB_USER: redmine_user
DB_PASS: "..."

This could result in:

production:
adapter: mysql2
socket: /var/run/mysqld/mysqld.sock
database: redmine
username: redmine_user
password: "..."

The socket option could take precedence over DB_HOST and DB_PORT when specified, while preserving the existing TCP configuration when DB_SOCKET is not defined.

This would provide more flexibility for local MySQL/MariaDB deployments without changing the existing configuration behaviour.

Thank you for considering this feature.

Actions

Also available in: Atom PDF