Open michaelryanmcneill opened 2 years ago
The --http
flag don't help on this case?
(I ask because also don't know very well this scenario)
@AdsonCicilioti no, the --http
flag will not help in this case. In this case the database is using TLS over TCP.
Thanks for the report, @michaelryanmcneill !
It looks like wp db cli --ssl
works because the assoc args are passed directly through:
However, wp db import
runs the arguments through some processing function:
It looks like this was added in https://github.com/wp-cli/db-command/pull/123
I think we'll need to adapt ::get_mysql_args()
to support --ssl
.
All db
related commands listed on https://developer.wordpress.org/cli/commands/db/ would benefit from using the --ssl
flag. As it stands some work over SSL and some do not.
Bug Report
Summary
Running wp db import with the
--ssl
flag fails to properly connect to the database as expected.How to reproduce
To reproduce, simply attempt to import with a user that requires SSL. For example:
But, if you run
wp db cli --ssl
, you can successfully connect to the database:Environment
Temporary workaround
To temporarily workaround this issue, use
wp db cli --ssl
and then source the file.