Skip to content

Commit 3f2a4b3

Browse files
Fix Read Replica for V-8.4.2 (#39)
Signed-off-by: AshrafulHaqueToni <[email protected]> Co-authored-by: SK Ali Arman <[email protected]>
1 parent f5a9b2c commit 3f2a4b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/run_read_only.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ function wait_for_mysqld_running() {
132132
function start_read_replica() {
133133
#stop_slave
134134
local mysql="$mysql_header --host=$localhost"
135-
$mysql_header -e "stop slave;"
135+
$mysql_header -e "stop replica;"
136136
ssl_config=",SOURCE_SSL=0"
137137
if [[ "$source_ssl" == "true" ]]; then
138138
ssl_config=",SOURCE_SSL=1,SOURCE_SSL_CA = '/etc/mysql/server/certs/ca.crt',SOURCE_SSL_CERT = '/etc/mysql/server/certs/tls.crt',SOURCE_SSL_KEY = '/etc/mysql/server/certs/tls.key'"
139139
require_SSL="REQUIRE SSL"
140140
fi
141141
echo $ssl_config
142-
out=$($mysql_header -e "CHANGE MASTER TO MASTER_HOST = '$SOURCE_HOST',MASTER_PORT = 3306,MASTER_USER = '$SOURCE_USERNAME',MASTER_PASSWORD = '$SOURCE_PASSWORD',MASTER_AUTO_POSITION = 1 $ssl_config;")
142+
out=$($mysql_header -e "CHANGE REPLICATION SOURCE TO SOURCE_HOST = '$SOURCE_HOST',SOURCE_PORT = 3306,SOURCE_USER = '$SOURCE_USERNAME',SOURCE_PASSWORD = '$SOURCE_PASSWORD',SOURCE_AUTO_POSITION = 1 $ssl_config;")
143143
echo $out
144144
sleep 1
145-
out=$($mysql_header -e "start slave;")
145+
out=$($mysql_header -e "start replica;")
146146
echo $out
147147

148148
$mysql_header -e "set global super_read_only=ON"

0 commit comments

Comments
 (0)