public function get_mysql_connection_args()
{
$args = array();
$args[] = '-u ' . escapeshellarg($this->get_user());
if ($this->get_password()) {
$args[] = '-p' . escapeshellarg($this->get_password());
}
$args[] = '-h ' . escapeshellarg($this->get_host());
if ($this->get_port()) {
$args[] = '-P ' . escapeshellarg($this->get_port());
}
if ($this->get_socket()) {
$args[] = '--protocol=socket -S ' . escapeshellarg($this->get_socket());
}
return $args;
}