I havent gotten latest hyperdb to work on 3.8.1.
Update, latest hyperDB is working with WP3.8.1. The problem I had was not related to WP installation.
Thread Starter
wpReg
(@wpreg)
That sounds good @kent – can you please share some details? What did you have to do to get it to work?
This is what I used to get HyperDB running with HAProxy. HAProxy listens on 6306 (MySQL master) 3306 (MySQL slaves):
db-config.php
….
$wpdb->add_database(array(
‘host’ => ‘haproxy:6306’, // If port is other than 3306, use host:port.
‘user’ => ‘user’,
‘password’ => ‘password’,
‘write’ => 1,
‘read’ => 0,
‘name’ => ‘wp_mu’,
‘dataset’ => ‘global’,
‘timeout’ => 0.2,
));
$wpdb->add_database(array(
‘host’ => ‘haproxy:3306’, // If port is other than 3306, use host:port.
‘user’ => ‘user’,
‘password’ => ‘password’,
‘write’ => 0,
‘read’ => 1,
‘name’ => ‘wp_mu’,
‘dataset’ => ‘global’,
‘timeout’ => 0.2,
));
….
wp-config.php
….
/*
define(‘DB_NAME’, ‘wp_mu’);
define(‘DB_USER’, ‘user’);
define(‘DB_PASSWORD’, ‘password’);
define(‘DB_HOST’, ‘haproxy’);
*/
….
Thats about it.
db.php goes in wp-content/
Thread Starter
wpReg
(@wpreg)
Thanks @kent!!! I am able to get it to work as needed between master/slave MySQL servers, the next hurdle now is that it doesn’t play well w3tc since they have the same file name db.php, so now exploring if w3tc has the same features…
I found a few options where w3tc’s db.php file can be renamed, but I don’t really want to do that at this point…
thanks once again!