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

Single-quote character docker secrets causes failure in user creation #1049

Closed
gsch-cmi opened this issue May 1, 2024 · 2 comments
Closed

Comments

@gsch-cmi
Copy link

gsch-cmi commented May 1, 2024

MySQL image fails to run when using docker secrets with MYSQL_PASSWORD_FILE when password file contains a single-quote (') character. Removing the single quote from the password file results in a successful run. It seems that some additional escaping of the password input, or at least documentation regarding this limitation would be helpful.

Thanks very much!

2024-05-01 11:19:59-04:00 [Note] [Entrypoint]: Creating database <redacted>
2024-05-01 11:19:59-04:00 [Note] [Entrypoint]: Creating user <redacted>
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<redacted>' at line 1
 *  Terminal will be reused by tasks, press any key to close it. 
@tianon
Copy link
Member

tianon commented May 2, 2024

I think we've probably got a better issue for it, but #613 (comment) has some very related comments (effectively, we don't currently escape passwords, which causes problems like this one).

@gsch-cmi
Copy link
Author

gsch-cmi commented May 2, 2024

Gotcha, thanks for the response, that issue definitely clarifies the problem better. Feel free to close this or leave open as suits your needs.

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

No branches or pull requests

3 participants