Pull in the default SSL config for DB backup/restore commands - #19366
Open
brandonkelly wants to merge 5 commits into
Open
Pull in the default SSL config for DB backup/restore commands#19366brandonkelly wants to merge 5 commits into
brandonkelly wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates MySQL backup/restore config generation so that when PDO SSL attributes aren’t explicitly set, Craft carries over the default MySQL SSL settings that would normally come from the system/user my.cnf chain (via mysql --print-defaults) even though --defaults-file causes those config files to be ignored.
Changes:
- Expand SSL attribute handling in
_createDumpConfigFile()to include CAPATH and CIPHER, and fall back to config-file-derived SSL defaults when no SSL attributes are set. - Add
_sslDefaultsFromConfigFiles()to extractssl_*directives frommysql --print-defaultsoutput and append them to the generated temporary my.cnf.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
brandonkelly
force-pushed
the
feature/default-ssl-conf
branch
from
August 3, 2026 18:33
a79329c to
74b3915
Compare
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.
Description
Updates
craft\db\mysql\Schema::_createDumpConfigFile()to pull in the defaultssl_*values (viamysql --print-defaults) if none of thePDO::MYSQL_ATTR_SSL_*DB connection attributes are set.Also adds attribute checks for
PDO::MYSQL_ATTR_SSL_CAPATHandMYSQL_ATTR_SSL_CIPHER.Related issues