-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure passwords can be read from options files (#180)
Fixes #166. Wowza what an issue. After spending way too much time googling various forms of "can't read password from mariadb options file", I started poking around the capi.jl file, and reading anything related to "options". I was trying to see if there was a way to have a debug print of what options were actually read from an options file. That's when I found the following in the docs for `mysql_real_connect`, which I'm now very thankful that past me decided to copy/paste all the api docs for every single api function. ``` For passwd, specify a value of NULL. (For the password, a value of the empty string in the mysql_real_connect() call cannot be overridden in an option file, because the empty string indicates explicitly that the MySQL account must have an empty password.) ``` So if you want a password to be read from an option file, you need to pass NULL to the `mysql_real_connect` function; but we were always passing an empty string! So it prevented reading any password from option files. Anyway, the fix is just that: by default we'll pass `nothing` as the password, which will pass NULL to the actual api call, allowing passwords to be read from option files.
- Loading branch information
Showing
4 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters