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
Error with handling passwords with symbols #478
Comments
Sounds like a bug. Version of mysql2 gem that you're using? |
Looks like mysql2, 0.3.14. |
Please try mysql2 0.3.13 as well, let's see if this was a recently introduced issue. |
Unfortunately it was on a production system so I can't easily test that. I can try to reproduce it on 0.3.13 on another system later. If it helps, the symbol was at the start of the password ex: "$foobar1234" |
Are you still seeing this problem? I'm not able to reproduce it. |
Closing for lack of updates. |
I think it can be closed, the error may have been mine. I was storing the password within an environment variable, ex: foo=$asdf. The problem seems to be the "$" wasn't escaped, it should have been: foo=$asdf. |
When connecting to my remote database with a mysql client I had no problem, but connecting through Mysql2 I keep getting access denied.
I was able to figure out the reason. For some reason or another Mysql2 doesn't properly handle symbols in passwords. In this instance, I had the symbol '$' in my password which was messing something up.
I am unsure if this was intentional and written down somewhere but I found no documentation restricting password characters, and again, it worked with the mysql client.
The text was updated successfully, but these errors were encountered: