Right now, people using Docker have trouble setting up WP-CLI correctly. They either need to install the mysql on their web server as well (instead of only on their database server), or use a separate WP-CLI container altogether.
I was now thinking that it might be possible to allow for a configuration setting that defines an SSH connection to use for the mysql binary. So, instead of blindly running mysql locally, WP-CLI could check whether there's such a configuration setting, and then first log into the actual database server that the SSH settings are pointing to and then run the mysql binary from that database server.
I'm not 100% clear on whether this would all techincally work, but it would certainly be worth some time to investigate.
Right now, people using Docker have trouble setting up WP-CLI correctly. They either need to install the
mysqlon their web server as well (instead of only on their database server), or use a separate WP-CLI container altogether.I was now thinking that it might be possible to allow for a configuration setting that defines an SSH connection to use for the
mysqlbinary. So, instead of blindly runningmysqllocally, WP-CLI could check whether there's such a configuration setting, and then first log into the actual database server that the SSH settings are pointing to and then run themysqlbinary from that database server.I'm not 100% clear on whether this would all techincally work, but it would certainly be worth some time to investigate.