Hello,
I have one nginx server with wordpress 4.4.1 installed. I have two MySQL VM's (replication configured - IP x.20 is master / x.21 is slave).
HyperDB configuration looks like below:
$wpdb->add_database(array(
'host' => '192.168.100.20', // If port is other than 3306, use host:port.
'user' => 'root',
'password' => 'pass',
'name' => 'wordpress',
'write' => 1,
'read' => 1,
'timeout' => 0.2,
));
$wpdb->add_database(array(
'host' => '192.168.100.21', // If port is other than 3306, use host:port.
'user' => 'root',
'password' => 'pass',
'name' => 'wordpress',
'write' => 0,
'read' => 1,
'timeout' => 0.2,
));
But when I turn off 1st (master) MySQL server I got error, that MySQL server is unavaliable - it's still trying to connect to the master server on 192.168.100.20 IP address.
All files are in proper location.