Open troy-system76 opened 2 years ago
Hi!
What happens if you run this command?
python -c 'from urllib.parse import urlparse, unquote; uri = urlparse("mysql://username:passwordWith@and@m@host.rds.amazonaws.com:5555/mydb"); print(uri.username); print(uri.password);'
Here I get
username
passwordWith@and@m
suggesting that @
symbols alone are not the source of your issue.
Thanks for the quick response. When I run:
python -c 'from urllib.parse import urlparse, unquote; uri = urlparse("mysql://username:passwordWith@and@m@host.rds.amazonaws.com:5555/mydb"); print(uri.username); print(uri.password);'
I get:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named parse
if I run:
python3 -c 'from urllib.parse import urlparse, unquote; uri = urlparse("mysql://username:passwordWith@and@m@host.rds.amazonaws.com:5555/mydb"); print(uri.username); print(uri.password);'
I get the same response you do.
/usr/bin/mycli has this:
Not that that means much. it's a tiny script that looks like it calls something else (apologies, I have very little python experience)
You might want to take a look at the python3 -c
output but using your actual DSN instead of the example we are using.
Our example works for both of us, but maybe your actual DSN does not.
when # in the url will get error python -c 'from urllib.parse import urlparse, unquote; uri = urlparse("mysql://root:pken3I#l1@10.10.20.211:29119/mydatabasess"); print(uri.username); print(uri.password);' --------> None None
Going out on a limb I'd say that I and @liygzting are missing a library that enables us to properly use special characters in passwords.
same issue , because my password contains '#' symbol
when # in the url will get error python -c 'from urllib.parse import urlparse, unquote; uri = urlparse("mysql://root:pken3I#l1@10.10.20.211:29119/mydatabasess"); print(uri.username); print(uri.password);' --------> None None
Me too
url encoding #
character into %23
as suggested here https://github.com/dbcli/mycli/issues/585#issuecomment-373989269 worked well for me!
I use Version: 1.23.2 of mycli.
I have this DSN:
myAlias = mysql://username:passwordWith@and@m@host.rds.amazonaws.com:5555/mydb
(a bunch of stuff is changed there)
But when I go:
mycli myAlias
I receive this error:
(2003, "Can't connect to MySQL server on '}gg$' ([Errno -2] Name or service not known)")
If I encode the uri with %40 for the @ signs I receive this error:
Do you know how I can make mycli work with @ in the passwords?
Thanks in advance