src/Acquia/Cloud/Environment/LocalEnvironment.php
public function addDatabaseCredentials($acquiaDbName, $localDbName, $username, $password = null, $host = 'localhost', $port = 3306)
    {
        $connString = $username;
        if ($password !== null) {
            $connString . ':' . $password;
        }

        $this->creds['databases'][$acquiaDbName] = array(
            'id'  => '1',
            'role' => $this->sitegroup, // Is this right? For local doesn't really matter.
            'name' => $localDbName,
            'user' => $username,
            'pass' => $password,
            'db_url_ha' => array(
                $host => "mysqli://$connString@$host:$port/mysiteprod"
            ),
            'db_cluster_id' => '1',
            'port' => $port,
        );

        return $this;
    }
public function addDatabaseCredentials($acquiaDbName, $localDbName, $username, $password = null, $host = 'localhost', $port = 3306)
    {
        $connString = $username;
        if ($password !== null) {
            $connString . ':' . $password;
        }

        $this->creds['databases'][$acquiaDbName] = array(
            'id'  => '1',
            'role' => $this->sitegroup, // Is this right? For local doesn't really matter.
            'name' => $localDbName,
            'user' => $username,
            'pass' => $password,
            'db_url_ha' => array(
                $host => "mysqli://$connString@$host:$port/mysiteprod"
            ),
            'db_cluster_id' => '1',
            'port' => $port,
        );

        return $this;
    }
public function addDatabaseCredentials ( $ acquiaDbName , $ localDbName , $ username , $ password = null , $ host = 'localhost' , $ port = 3306 ) { $ connString = $ username ; if ( $ password !== null ) { $ connString . ':' . $ password ; } $ this -> creds [ 'databases' ] [ $ acquiaDbName ] = array ( 'id' => '1' , 'role' => $ this -> sitegroup , // Is this right? For local doesn't really matter. 'name' => $ localDbName , 'user' => $ username , 'pass' => $ password , 'db_url_ha' => array ( $ host => "mysqli://$connString@$host:$port/mysiteprod" ) , 'db_cluster_id' => '1' , 'port' => $ port , ) ; return $ this ; }
Adds credentials to a database server.

@param string $acquiaDbName
@param string $localDbName
@param string $username
@param string|null $password
@param string $host
@param integer $port

@return \Acquia\Cloud\Environment\LocalEnvironment
Adds credentials to a database server .