-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.3.3]: Using --defaults-extra in mysqldump causing backupcommand to fail #12349
Comments
Just to make sure I'm following, you've got a Craft's default backup command uses |
Correct |
Here the relevant part from the mysql docs https://dev.mysql.com/doc/refman/8.0/en/option-file-options.html#option_general_defaults-extra-file |
@jan-thoma I'm assuming that the user creds in |
Nermind... could replicate it - fixed for the next release! |
Craft 4.3.4 is out with that fix. |
The restore command is affected as well
|
@jan-thoma Thanks for pointing that out! We released Craft 4.3.5 yesterday with a fix for DB restoring as well. |
@brandonkelly The OP is better off modifying the MySQL credentials defined in their Craft Copy needs it to set some configuration variables in order to maintain MySQL version incompatibilities. I also doubt that Craft Copy is the only external library susceptible to this change. |
@pheeque1 I doubt we’ll find a default backup command that pleases everyone, but that command is 100% customizable via the https://craftcms.com/docs/4.x/config/general.html#backupcommand config setting, and Craft will respect that setting, so people can customize it as they need on a case-by-case basis. |
Hi @angrybrad! I just encountered an issue where I learned that some shared hosts and vps hosts don't allow writing to the core system tmp file folder and so the backup command fails without error message because of sys_get_temp_dir in the _createDumpConfigFile(). It seems that writing to the system tmp file isn't universally recognized. Could an .env variable be added so that we can simply override when encountering this issue? Should I open a new issue or would you prefer reopening this one? Thanks! |
@davidwebca could you make a new issue, please? I'll look into it. |
What happened?
Description
The argument
--defaults-extra-file
in the backup command reads in the standard config if present and let the command fail if another config is present.Steps to reproduce
~/.my.cnf
fileExpected behavior
Craft should only read Credentials from it's own
.env
file. Therefore--defaults-file
instead of--defaults-extra-file
should be usedActual behavior
CraftCMS chooses the credentials from
~/.my.cnf
Craft CMS version
4.3.3
PHP version
8.1
Operating system and version
DDEV
Database type and version
MySQL 5.7
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: