I have the following settings but I am still not getting write to master
-
I have two web servers (xxx.xxx.xxx.4 and xxx.xxx.xxx.5) that are trying to read from a master slave configuration.
the db.php is in the wp-config folder.
I have added the following line to wp-config.php file:define ( 'DB_CONFIG_FILE' , '/var/www/html/%folder_name%/%folder_name%/db-config.php' );
I have added the following to the db-config.php file:
$myVAR1 = "%Password%"; $escapedMyVAR1 = mysql_real_escape_string($myVAR1); $myVAR2 = "xxx.xxx.xxx.6"; $escapedMyVAR2 = mysql_real_escape_string($myVAR2); $myVAR3 = "xxx.xxx.xxx.7"; $escapedMyVAR3 = mysql_real_escape_string($myVAR3); $wpdb->add_database(array( 'host' => $escapedMyVAR2, // If port is other than 3306, use host:port. 'user' => %Username%, 'password' => $escapedMyVAR1, 'name' => %Database%, )); $wpdb->add_database(array( 'host' => $escapedMyVAR3, // If port is other than 3306, use host:port. 'user' => %Username%, 'password' => $escapedMyVAR1, 'name' => %Database%, 'write' => 0, 'read' => 1, 'dataset' => 'global', 'timeout' => 0.2, ));
Should I just remove all the defined(‘DB_NAME’, in wp-config.php?
It still has the master (xxx.xxx.xxx.6) config in there, will this cause the hyperdb to not enable?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘I have the following settings but I am still not getting write to master’ is closed to new replies.