Quotes string values and specifically escapes backslashes so they're not
misintepreted as special chars in the config.
For #22
protected function createOptionsFile(): string
{
$path = tempnam(sys_get_temp_dir(), 'bs-cli-mysql-opts');
- $contents = "[client]\nuser={$this->user}\nhost={$this->host}\nport={$this->port}\npassword={$this->password}\nprotocol=TCP";
+ $password = str_replace('\\', '\\\\', $this->password);
+ $contents = "[client]\nuser='{$this->user}'\nhost='{$this->host}'\nport={$this->port}\npassword='{$password}'\nprotocol=TCP";
file_put_contents($path, $contents);
chmod($path, 0600);
return $path;