|
| 1 | +--- |
| 2 | +title: Connect to and manage MySQL |
| 3 | +description: This guide describes how to connect to MySQL in Azure Purview, and use Purview's features to scan and manage your MySQL source. |
| 4 | +author: linda33wj |
| 5 | +ms.author: jingwang |
| 6 | +ms.service: purview |
| 7 | +ms.subservice: purview-data-map |
| 8 | +ms.topic: how-to #Required; leave this attribute/value as-is. |
| 9 | +ms.date: 11/02/2021 |
| 10 | +ms.custom: template-how-to #Required; leave this attribute/value as-is. |
| 11 | +--- |
| 12 | + |
| 13 | +# Connect to and manage MySQL in Azure Purview (Preview) |
| 14 | + |
| 15 | +This article outlines how to register MySQL, and how to authenticate and interact with MySQL in Azure Purview. For more information about Azure Purview, read the [introductory article](overview.md). |
| 16 | + |
| 17 | +> [!IMPORTANT] |
| 18 | +> MySQL as a source is currently in PREVIEW. The [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) include additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability. |
| 19 | +
|
| 20 | +## Supported capabilities |
| 21 | + |
| 22 | +|**Metadata Extraction**| **Full Scan** |**Incremental Scan**|**Scoped Scan**|**Classification**|**Access Policy**|**Lineage**| |
| 23 | +|---|---|---|---|---|---|---| |
| 24 | +| [Yes](#register)| [Yes](#scan)| No | No | No | No| Yes| |
| 25 | + |
| 26 | +The supported MySQL server versions are 5.7 to 8.x. |
| 27 | + |
| 28 | +When scanning MySQL source, Purview supports: |
| 29 | + |
| 30 | +- Extracting metadata including MySQL server, databases, tables, views, table/view columns, etc. |
| 31 | +- Fetching lineage on assets relationships among tables and views. |
| 32 | + |
| 33 | +## Prerequisites |
| 34 | + |
| 35 | +* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
| 36 | + |
| 37 | +* An active [Purview resource](create-catalog-portal.md). |
| 38 | + |
| 39 | +* You will need to be a Data Source Administrator and Data Reader to register a source and manage it in the Purview Studio. See [Azure Purview Permissions page](catalog-permissions.md) for details. |
| 40 | + |
| 41 | +* Set up the latest [self-hosted integration runtime](https://www.microsoft.com/download/details.aspx?id=39717). For more information, see [the create and configure a self-hosted integration runtime guide](../data-factory/create-self-hosted-integration-runtime.md). |
| 42 | + |
| 43 | +* Ensure [JDK 11](https://www.MySQL.com/java/technologies/javase-jdk11-downloads.html) is installed on the virtual machine where the self-hosted integration runtime is installed. |
| 44 | + |
| 45 | +* Ensure Visual C++ Redistributable for Visual Studio 2012 Update 4 is installed on the self-hosted integration runtime machine. If you don't have this update installed, [you can download it here](https://www.microsoft.com/download/details.aspx?id=30679). |
| 46 | + |
| 47 | +* The MySQL user must have the SELECT, SHOW VIEW and EXECUTE permissions for each target MySQL schema that contains metadata. |
| 48 | + |
| 49 | +## Register |
| 50 | + |
| 51 | +This section describes how to register MySQL in Azure Purview using the [Purview Studio](https://web.purview.azure.com/). |
| 52 | + |
| 53 | +### Steps to register |
| 54 | + |
| 55 | +To register a new MySQL source in your data catalog, do the following: |
| 56 | + |
| 57 | +1. Navigate to your Purview account in the [Purview Studio](https://web.purview.azure.com/resource/). |
| 58 | +1. Select **Data Map** on the left navigation. |
| 59 | +1. Select **Register** |
| 60 | +1. On Register sources, select **MySQL**. Select **Continue**. |
| 61 | + |
| 62 | +On the **Register sources (MySQL)** screen, do the following: |
| 63 | + |
| 64 | +1. Enter a **Name** that the data source will be listed within the Catalog. |
| 65 | + |
| 66 | +1. Enter the **Server** name to connect to a MySQL source. This can either be: |
| 67 | + * A host name used to connect to the database server. For example: `MyDatabaseServer.com` |
| 68 | + * An IP address. For example: `192.169.1.2` |
| 69 | + * Its fully qualified JDBC connection string. For example: |
| 70 | + |
| 71 | + ``` |
| 72 | + jdbc:mysql://COMPUTER_NAME_OR_IP/DATABASE_NAME |
| 73 | + ``` |
| 74 | +
|
| 75 | +1. Enter the **Port** used to connect to the database server (3306 by default for MySQL). |
| 76 | +
|
| 77 | +1. Select a collection or create a new one (Optional) |
| 78 | +
|
| 79 | +1. Finish to register the data source. |
| 80 | +
|
| 81 | + :::image type="content" source="media/register-scan-mysql/register-sources.png" alt-text="register sources options" border="true"::: |
| 82 | +
|
| 83 | +## Scan |
| 84 | +
|
| 85 | +Follow the steps below to scan MySQL to automatically identify assets and classify your data. For more information about scanning in general, see our [introduction to scans and ingestion](concept-scans-and-ingestion.md). |
| 86 | +
|
| 87 | +### Authentication for a scan |
| 88 | +
|
| 89 | +The supported authentication type for a MySQL source is **Basic authentication**. |
| 90 | +
|
| 91 | +### Create and run scan |
| 92 | +
|
| 93 | +To create and run a new scan, do the following: |
| 94 | +
|
| 95 | +1. In the Management Center, select Integration runtimes. Make sure a self-hosted integration runtime is set up. If it is not set up, use the steps mentioned [here](./manage-integration-runtimes.md) to create a self-hosted integration runtime. |
| 96 | +
|
| 97 | +1. Navigate to **Sources**. |
| 98 | +
|
| 99 | +1. Select the registered MySQL source. |
| 100 | +
|
| 101 | +1. Select **+ New scan**. |
| 102 | +
|
| 103 | +1. Provide the below details: |
| 104 | +
|
| 105 | + 1. **Name**: The name of the scan |
| 106 | +
|
| 107 | + 1. **Connect via integration runtime**: Select the configured self-hosted integration runtime |
| 108 | +
|
| 109 | + 1. **Credential**: Select the credential to connect to your data source. Make sure to: |
| 110 | + * Select **Basic Authentication** while creating a credential. |
| 111 | + * Provide the user name used to connect to the database server in the User name input field. |
| 112 | + * Store the user password used to connect to the database server in the secret key. |
| 113 | +
|
| 114 | + 1. **Database**: List subset of schemas to import expressed as a semicolon separated list. For example, `schema1; schema2`. All user schemas are imported if that list is empty. All system schemas (for example, SysAdmin) and objects are ignored by default. When the list is empty, all available schemas are imported. |
| 115 | +
|
| 116 | + Acceptable schema name patterns using SQL LIKE expressions syntax include using %. For Example: `A%; %B; %C%; D` |
| 117 | + * Start with A or |
| 118 | + * End with B or |
| 119 | + * Contain C or |
| 120 | + * Equal D |
| 121 | +
|
| 122 | + Usage of NOT and special characters are not acceptable. |
| 123 | +
|
| 124 | + 1. **Maximum memory available**: Maximum memory (in GB) available on customer's VM to be used by scanning processes. This is dependent on the size of MySQL source to be scanned. |
| 125 | +
|
| 126 | + > [!Note] |
| 127 | + > As a thumb rule, please provide 1GB memory for every 1000 tables |
| 128 | +
|
| 129 | + :::image type="content" source="media/register-scan-mysql/scan.png" alt-text="scan MySQL" border="true"::: |
| 130 | +
|
| 131 | +1. Select **Continue**. |
| 132 | +
|
| 133 | +1. Choose your **scan trigger**. You can set up a schedule or ran the scan once. |
| 134 | +
|
| 135 | +1. Review your scan and select **Save and Run**. |
| 136 | +
|
| 137 | +[!INCLUDE [create and manage scans](includes/view-and-manage-scans.md)] |
| 138 | +
|
| 139 | +## Next steps |
| 140 | +
|
| 141 | +Now that you have registered your source, follow the below guides to learn more about Purview and your data. |
| 142 | +
|
| 143 | +- [Data insights in Azure Purview](concept-insights.md) |
| 144 | +- [Lineage in Azure Purview](catalog-lineage-user-guide.md) |
| 145 | +- [Search Data Catalog](how-to-search-catalog.md) |
0 commit comments