I am using web2py to connect to a db with an 'at' sign in the password, eg 'P@sswd' .
db = DAL('mysql://user1:P@sswd@localhost/test')
This gets interpreted as a connection to host 'sswd@localhost' using password 'P'.
I have tried the obvious URL escaping technique but this failed:
db = DAL('mysql://user1:P%40sswd@localhost/test')
Is there a resource that explains the escaping conventions used in these URL style connection strings?
You should use decode_credentials
option:
db = DAL('mysql://user1:P%40sswd@localhost/test', decode_credentials=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With