You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 30, 2018. It is now read-only.
Please find below configuration snnipet of db.php file.how to check write query goes to rds maria master database and read query goes to rds read replica.
$wpdb->add_database(array(
'host' => 'masterdatabase', // If port is other than 3306, use host:port.
'user' => 'xxxxx',
'password' => 'xxxxxx',
'name' => 'xxxxxx',
'write' => 1, // master server takes write queries
'read' => 0, // ... and read queries
));
/**
This adds the same server again, only this time it is configured as a slave.
The last three parameters are set to the defaults but are shown for clarity.
*/
$wpdb->add_database(array(
'host' => 'readreplicadbatabase', // If port is other than 3306, use host:port.
'user' => 'xxxxx',
'password' => 'xxxxxx',
'name' => 'xxxxx',
'write' => 0,
'read' => 1,
'dataset' => 'global',
'timeout' => 0.2,
));
It would be greatful if you suggest any changes to achieve this.
Hello,
Please find below configuration snnipet of db.php file.how to check write query goes to rds maria master database and read query goes to rds read replica.
$wpdb->add_database(array(
'host' => 'masterdatabase', // If port is other than 3306, use host:port.
'user' => 'xxxxx',
'password' => 'xxxxxx',
'name' => 'xxxxxx',
'write' => 1, // master server takes write queries
'read' => 0, // ... and read queries
));
/**
*/
$wpdb->add_database(array(
'host' => 'readreplicadbatabase', // If port is other than 3306, use host:port.
'user' => 'xxxxx',
'password' => 'xxxxxx',
'name' => 'xxxxx',
'write' => 0,
'read' => 1,
'dataset' => 'global',
'timeout' => 0.2,
));
It would be greatful if you suggest any changes to achieve this.