Solar_Sql_Adapter_MysqlReplicated::_setDsn()

protected void Solar_Sql_Adapter_MysqlReplicated::_setDsn ( void )

Sets the DSN for the slave and the master; the slave is picked at random from the list of slaves.

Parameters

  • None.

Returns

  • (void)

Description

Sets the DSN for the slave and the master; the slave is picked at random from the list of slaves.

For example, "mysql:host=127.0.0.1;dbname=test"

For the keys 'port', 'user', 'pass', and 'name', if one is missing, it gets set automatically from the master value. This lets you avoid some repetition in your slave config setups, assuming that the values are the same for the master and slaves.

See Also



Local