Dear all, Have you tried using @ symbol on your MySQL password? I can't connect to my db cause it use @ in the password The error message on abort handler : Failed to start connection pool -- no password specified in URL
How to solve this without change the db password?
Thanks
On Fri, Jul 13, 2012 at 9:48 AM, Hans Richardo qrx_1088@yahoo.com wrote:
Dear all, Have you tried using @ symbol on your MySQL password? I can't connect to my db cause it use @ in the password The error message on abort handler : Failed to start connection pool -- no password specified in URL
How to solve this without change the db password?
Hi Hans,
What version of libzdb are you using? Do you have the same problem if '?', '&', or '%' are in your password?
There is support for URL encoding in libzdb http://code.google.com/p/libzdb/source/browse/trunk/src/net/URL.re
But I can't see where this is actually used in a way that allows unsafe characters in the password. I suspect this needs a patch to libzdb to resolve.
Regards, Kieran -- Kieran Tully, Software Developer and Tenor, http://ktully.net
I can confirm that there is a problem with both '@' and '&' but not '%' nor '?'. Both '@' and '&' are stop tokens during URL parsing:
1) mysql://localhost:3306/test?user=foo&password=bar
2) mysql://foo:bar@localhost:3306/test
The '&' char may be part of the password if variant 2 above is used, but not in 1. The '@' char cannot be used at all. The reason is that the URL parser is 'greedy' and parse from protocol level until the first @ and take the whole string as credentials. URL encoding cannot be used as a workaround since libzdb does not decode the URL at connection time. Support for URL encode/decode is a good idea and may be (re)added in future versions. IRC I think I had this in one of the first versions but dropped it, because I assumed the connection url would be simple enough.
So basically the only char that cannot be used in a password (now) is exactly '@'.
Best regards -- Jan-Henrik Haukeland http://tildeslash.com/
On Jul 13, 2012, at 12:16 PM, Kieran Tully wrote:
On Fri, Jul 13, 2012 at 9:48 AM, Hans Richardo qrx_1088@yahoo.com wrote:
Dear all, Have you tried using @ symbol on your MySQL password? I can't connect to my db cause it use @ in the password The error message on abort handler : Failed to start connection pool -- no password specified in URL
How to solve this without change the db password?
Hi Hans,
What version of libzdb are you using? Do you have the same problem if '?', '&', or '%' are in your password?
There is support for URL encoding in libzdb http://code.google.com/p/libzdb/source/browse/trunk/src/net/URL.re
But I can't see where this is actually used in a way that allows unsafe characters in the password. I suspect this needs a patch to libzdb to resolve.
Regards, Kieran -- Kieran Tully, Software Developer and Tenor, http://ktully.net -- To unsubscribe: http://www.tildeslash.com/mailman/listinfo/libzdb-general