MariaDB Cloud Stored Procedures
change_external_primary
Executes the CHANGE MASTER TO statement to configure inbound replication from an external primary server based on binary log file and position.
CALL sky.change_external_primary(
host VARCHAR(255),
port INT,
logfile TEXT,
logpos LONG ,
use_ssl_encryption BOOLEAN
);
-- Run_this_grant_on_your_external_primary |
GRANT REPLICATION SLAVE ON *.* TO 'skysql_replication'@'%' IDENTIFIED BY '<password_hash>'; |
change_connect_retry
Sets the connection retry interval for the external replication master.
CALL change_connect_retry(connect_retry INT);If the value is NULL, a default retry interval of 60 seconds will be used.
change_external_primary_gtid
Executes the CHANGE MASTER TO statement to configure inbound replication from an external primary server based on the provided GTID.
change_heartbeat_period
Sets the heartbeat period for the external replication master.
If the value is NULL, a default heartbeat period of 5 seconds will be used.
change_replica_delay
Sets the replication delay for the external replication master.
If the value is NULL, a default delay of 1 second will be used.
change_use_ssl_encryption
Toggles the SSL encryption setting for the external replication master.
If the value is NULL, SSL encryption will be enabled by default.
gtid_status
Provides a list of GTID-related system variables.
kill_session
Kills any non-root or non-MariaDB Cloud threads, similar to the KILL statement.
replication_grants
Provides a GRANT statement to run on an external primary server when configuring inbound replication.
replication_status
Executes the SHOW REPLICA STATUS statement to obtain the status of inbound replication.
reset_replication
Executes the RESET REPLICA statement to clear inbound replication configuration.
set_master_ssl
Toggles the MASTER_SSL replication option using the CHANGE MASTER TO statement.
skip_repl_error
This stored procedure can be used to ignore a transaction that is causing a replication error.
Executes the STOP REPLICA statement, then sets the sql_slave_skip_counter system variable, and then executes the START REPLICA statement to skip a single transaction. Does not currently work with GTID.
start_replication
Executes the START REPLICA statement to start inbound replication from an external primary.
start_replication_until
Start the external replication until a specified relay log file and position. It checks if the replication threads are running and starts the replication if they are not. It also provides feedback on the replication status.
start_replication_until_gtid
Starts the external replication until the specified GTID position. It checks if the replication threads are running and starts the replication if they are not. It also provides feedback on the replication status.
stop_replication
Executes the STOP REPLICA statement to stop inbound replication from an external primary.
Last updated
Was this helpful?

