Repository navigation
Add DB_SOCKET support for MySQL/MariaDB and make it override TCP DB settings - #603
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add support for MySQL/MariaDB socket configuration
Add Sep 22, 2026
DB_SOCKET support for MySQL/MariaDB and make it override TCP DB settings
jcormier
requested changes
Sep 22, 2026
jcormier
requested changes
Sep 22, 2026
Build the mysqladmin, mysql, pg_isready, and true probe/query commands as arrays instead of strings, so hostnames, ports and paths containing spaces or glob characters survive word-splitting/pathname expansion intact. Also stop passing the MySQL password as a literal -p argument (visible via `ps`) and pass it through MYSQL_PWD instead, for both the mysqladmin connection check and the mysql transaction-isolation query.
Allow connecting to MySQL/MariaDB over a Unix socket via DB_SOCKET. When set (with DB_ADAPTER=mysql2), it takes precedence over DB_HOST/DB_PORT for the connection check, the transaction-isolation query, and database.yml, and the host/port keys are stripped from the rendered config instead of the socket key.
jcormier
force-pushed
the
copilot/feature-support-mysql-socket
branch
from
September 23, 2026 13:33
8876354 to
f511b65
Compare
jcormier
marked this pull request as ready for review
September 23, 2026 13:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds first-class support for MySQL/MariaDB Unix socket connections in Redmine container configuration. When
DB_SOCKETis provided (withDB_ADAPTER=mysql2), generated DB config now prefers socket-based connectivity overDB_HOST/DB_PORTwhile preserving current TCP behavior when unset.Runtime DB parameter handling
DB_SOCKETto runtime environment defaults.DB_HOST.database.ymlgeneration behaviorsockettemplating support in the database config template.DB_SOCKETis set: removehost/portkeys from generateddatabase.ymlDB_SOCKETis unset: removesocketkeyMySQL connection checks and command safety
command -vfirst, fallback scan).Documentation updates
DB_SOCKETto the configuration reference.Generated
database.yml(MySQL socket mode) now includessocket:and omitshost:/port:.