-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Mysql overrides don't work on traditional Windows #3801
Comments
What about just let traditional Windows use the old method? # If we have extra mariadb cnf files,, copy them to where they go.
if [ -d /mnt/ddev_config/mysql ] && [ "$(echo /mnt/ddev_config/mysql/*.cnf)" != "/mnt/ddev_config/mysql/*.cnf" ] ; then
if [ "${OS:-$(uname)}" = "Windows_NT" ] ; then
sudo cp /mnt/ddev_config/mysql/*.cnf /etc/mysql/conf.d
sudo chmod -R ugo-w /etc/mysql/conf.d
else
echo "!includedir /mnt/ddev_config/mysql" >/etc/mysql/conf.d/ddev.cnf
fi
fi I haven't tested this and I'm not particularly skilled at writing bash scripts, so please excuse potential mistakes :) |
I'm not sure why all projects can't use the old method, but what you propose would be OK, except for the added complexity. |
Yes, using the "old" method on all host OS's might be a valid solution as well. I'm not involved enough to place value on the change. The new method did teach me that !includedir is a thing that works in MySQL cnf files. |
I encountered this bug today. The workaround with the Dockerfile works, but is less than ideal. Any concerns with a patch implementing the "old" method? I'm glad to pick up this work. |
I don't mind if you want to do that! |
Is there an existing issue for this?
Run a Diagnostic and Paste Link Here
No response
Current Behavior
On Windows, as reported by Jon McLaughlin in https://discord.com/channels/664580571770388500/961636249985237103
.ddev/mysql/*.cnf
don't work.This is a result of trying to use the mounted Windows directory directly (/mnt/ddev-config), for which permissions are not in our control.
DDEV 1.17.0-alpha6 seems to have introduced this; prior to that, the config files were copied into /etc/mysql in the container to solve exactly this problem. The problem originates with the removal of this line, https://github.com/drud/ddev/pull/2806/files#diff-db674dfd9698544c77815b1df958a12fb4d5b4a2a1ec2b3f167cf30c44be901dL50
(and of course, directly including /mnt/ddev_config/mysql)
Expected Behavior
You should be able to use mysql overrides on Windows.
Steps To Reproduce
On windows, use any mysql override.
Anything else?
Proposed workaround from the Discord channel is to install the needed overrides using a custom .ddev/db-build/Dockerfile:
The text was updated successfully, but these errors were encountered: