DBSource should allow a username with an empty password.
Description
Release Notes
Activity

Albert Shau February 25, 2016 at 1:38 AM

Andreas Neumann September 21, 2015 at 5:43 AM
If you specify user name and password, it works fine.
Instead of no password, I think that you have to pass empty string as the password to DBInputFormat.

Bhooshan Mogal September 21, 2015 at 3:08 AM
Ok, I'll take a look at how we can fix it. We'll have to investigate how DBInputFormat
reacts to a non-null user name and a missing password.
Just to confirm, this won't work if you don't specify both username and password, right?

Andreas Neumann September 20, 2015 at 5:42 PMEdited
I was a username but no password. That is how mySQL is set up by default when you install it on your Mac: user "root" is configured with NO password. If you actually specify one, you get permission denied. I think in mySQL "no password" is equivalent to "empty password".
I worked around it by configuring a password.

Bhooshan Mogal September 20, 2015 at 3:44 PM
In this case, were both the username and password specified but password was empty? or was username specified but password was not?
The former will work while the latter will fail. Is that behavior ok? Or should we enhance it to pass an empty password when a null is specified?
In either case, we do not have a test for these combinations, so we should at least add a test for the current behavior.
In mySQL, the default is user root with NO password, that is, empty password. Currently, we throw an exception in that case.