##Introduction
This project exposes the following namespaces for use in your custom use:
- CSI\Drivers\PDO\HAProxy
use CSI\Drivers\PDO
$proxy = new HAProxy();
$proxy->CreatMaster('mysql:host=MASTER_DB_HOST;dbname=MASTER_DB_NAME','MASTER_DB_USER','MASTER_DB_PASSWORD');
$proxy->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');
// Framework::setup($proxy);
use CSI\Drivers\PDO\HAProxy as PDO;
or:
if ($dsn instanceof PDO || $dsn instanceof HAProxy) {
This line happens twice on current RedBean v3.0.1, on lines 29 and 1937 on rb.php file. Repalce both.
or:
$SOME_PDO ...
$SOME_PDO = new HAProxy($SOME_PDO);
$SOME_PDO->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');
\PDO $SOME_PDO ...
HAProxy supports the simplest MySQL Replication setup, where you have a Master, and a readonly.
@t4g @mauricoder