forked from OpenNeo/impress
Ensure rails public_data:pull
doesn't use SSL for localhost
I upgraded our local MariaDB for compatibility with the latest server dumps (https://mariadb.org/mariadb-dump-file-compatibility-change/), and I thiiiink what I'm seeing is that, also in this version of MariaDB, the default value for the `ssl` option is `true`? That is, command-line clients will try to connect over SSL by default—which isn't generally supported on development servers, where this task runs. I could probably fix this with a change to my local config? But I figure I can't really picture a scenario where this option being set in the task would be *wrong*, but I *can* see it saving future people time if they're working in a similar environment. So, let's just set it!
This commit is contained in:
parent
a37dda6af7
commit
d79b6b6c33
1 changed files with 1 additions and 0 deletions
|
@ -74,6 +74,7 @@ namespace :public_data do
|
|||
# The connection details for our database!
|
||||
config = ApplicationRecord.connection_db_config.configuration_hash
|
||||
args << "--host=#{config[:host]}" if config[:host]
|
||||
args << "--ssl=false" # SSL is the default for recent MariaDB; override!
|
||||
args << "--user=#{config[:username]}" if config[:username]
|
||||
args << "--password=#{config[:password]}" if config[:password]
|
||||
args << "--database=#{config.fetch(:database)}"
|
||||
|
|
Loading…
Reference in a new issue