|
| 1 | +--- |
| 2 | +title: Azure Database for MySQL stored procedures |
| 3 | +description: This article introduces stored procedures specific to Azure Database for MySQL. |
| 4 | +author: ajlam |
| 5 | +ms.author: andrela |
| 6 | +ms.service: mysql |
| 7 | +ms.topic: conceptual |
| 8 | +ms.date: 09/19/2019 |
| 9 | +--- |
| 10 | + |
| 11 | +# Azure Database for MySQL Stored Procedures |
| 12 | + |
| 13 | +Stored procedures are available on Azure Database for MySQL servers to help manage your MySQL server. This includes managing your server's connections, queries, and setting up Data-in Replication. |
| 14 | + |
| 15 | +## Data-in Replication stored procedures |
| 16 | + |
| 17 | +Data-in Replication allows you to synchronize data from a MySQL server running on-premises, in virtual machines, or database services hosted by other cloud providers into the Azure Database for MySQL service. |
| 18 | + |
| 19 | +The following stored procedures are used to set up or remove Data-in Replication between a master and replica. |
| 20 | + |
| 21 | +|**Stored Procedure Name**|**Input Parameters**|**Output Parameters**|**Usage Note**| |
| 22 | +|-----|-----|-----|-----| |
| 23 | +|*mysql.az_replication_change_master*|master_host<br/>master_user<br/>master_password<br/>master_port<br/>master_log_file<br/>master_log_pos<br/>master_ssl_ca|N/A|To transfer data with SSL mode, pass in the CA certificate’s context into the master_ssl_ca parameter. </br><br>To transfer data without SSL, pass in an empty string into the master_ssl_ca parameter.| |
| 24 | +|*mysql.az_replication _start*|N/A|N/A|Starts replication.| |
| 25 | +|*mysql.az_replication _stop*|N/A|N/A|Stops replication.| |
| 26 | +|*mysql.az_replication _remove_master*|N/A|N/A|Removes the replication relationship between the master and replica.| |
| 27 | +|*mysql.az_replication_skip_counter*|N/A|N/A|Skips one replication error.| |
| 28 | + |
| 29 | +To set up Data-in Replication between a master and a replica in Azure Database for MySQL, refer to [how to configure Data-in Replication](howto-data-in-replication.md). |
| 30 | + |
| 31 | +## Other stored procedures |
| 32 | + |
| 33 | +The following stored procedures are available in Azure Database for MySQL to manage your server. |
| 34 | + |
| 35 | +|**Stored Procedure Name**|**Input Parameters**|**Output Parameters**|**Usage Note**| |
| 36 | +|-----|-----|-----|-----| |
| 37 | +|*mysql.az_kill*|processlist_id|N/A|Equivalent to [`KILL CONNECTION`](https://dev.mysql.com/doc/refman/8.0/en/kill.html) command. Will terminate the connection associated with the provided processlist_id after terminating any statement the connection is executing.| |
| 38 | +|*mysql.az_kill_query*|processlist_id|N/A|Equivalent to [`KILL QUERY`](https://dev.mysql.com/doc/refman/8.0/en/kill.html) command. Will terminate the statement the connection is currently executing. Leaves the connection itself alive.| |
| 39 | +|*mysql.az_load_timezone*|N/A|N/A|Loads time zone tables to allow the `time_zone` parameter to be set to named values (ex. "US/Pacific").| |
| 40 | + |
| 41 | +## Next steps |
| 42 | +- Learn how to set up [Data-in Replication](howto-data-in-replication.md) |
| 43 | +- Learn how to use the [time zone tables](howto-server-parameters.md#working-with-the-time-zone-parameter) |
0 commit comments