Skip to content
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

Fix mysql password 3 #2662

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fix mysql password 3 #2662

wants to merge 4 commits into from

Conversation

eldering
Copy link
Member

No description provided.

See for reference:
- https://dev.mysql.com/doc/refman/8.0/en/connecting-using-uri-or-key-value-pairs.html#connecting-using-uri
- https://symfony.com/doc/current/doctrine.html
but note that we must use `rawurlencode` instead of `urlencode` which
differ in how they encode a space (as tested).

Fixes: #2651
Closes: #2502 as this is likely fixed but I couldn't reproduce it
There was no easy way to do this, besides also completely
dropping and recreating an empty database.
Use URL encoding in DATABASE_URL and return mysql_options
as an array (via ugly global variable), so each element
in it can be separately added to the command line using
`@` for expansion.
@@ -33,7 +33,7 @@ fi

# Generate a dbpasswords file
# Note that this does not use ${DATABASE_NAME} since Symfony adds the _test postfix itself
echo "unused:sqlserver:domjudge:domjudge:domjudge:3306" > etc/dbpasswords.secret
echo 'unused:sqlserver:domjudge:domjudge:domjudge_+% #$*)@(!/;,.:3306' > etc/dbpasswords.secret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to do the same trick in .github/workflows/*.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants