CraftCli\Command\DbPullCommand::testRemoteCredentials PHP Method

testRemoteCredentials() protected method

Test remote database credentials
protected testRemoteCredentials ( ) : boolean
return boolean
    protected function testRemoteCredentials()
    {
        $remoteCommand = (string) $this->makeMysqlCommand(MysqlCommand::class, $this->remoteCredentials, 'SHOW TABLES');
        if ($this->sshCredentials) {
            $remoteCommand = (string) $this->makeSshCommand($remoteCommand);
        }
        if ($this->debug) {
            $this->output->writeln($remoteCommand);
            return true;
        }
        exec($remoteCommand, $output, $status);
        return $status === 0;
    }