Overview
Use the Netskope DSPM automation script to configure multiple MySQL data stores simultaneously. This script supports scanning MySQL Data Stores for the following cloud-managed services:
- AWS Aurora MySQL
- AWS RDS MySQL
- GCP Cloud SQL MySQL
- Azure MySQL
Prerequisites:
To run this script, ensure your environment meets the following requirements:
- Python (version 3 or higher) installed locally.
- Network Connectivity: The Netskope DSPM application must have network access to the target Data Stores.
- Service Account: A properly configured Netskope DSPM service account for each Data Store.
- Connection Details: The endpoint URL and port for each Data Store
Setup Input File
The script requires an input file containing your data store details. Create a .CSV file (without headers) where each row represents a data store.
CSV Format Populate the columns in the following order. Ensure you enter the values exactly as retrieved from your environment:
| Input | Value |
|---|---|
| Endpoint | Enter the endpoint URL and port number gathered in the Prerequisites step. Example: example-endpoint.us-west-2.rds.amazonaws.com:3306Note: 3306 is the default MySQL port. If you use a custom port, substitute it here. |
| Service Account User | Enter the username of the service account you configured in the Prerequisites step. |
| Service Account Password | Enter the corresponding password for the service account mentioned above. |
| Data Store Identifier | Provide a friendly name to describe this Data Store. Usage: This value will be displayed in Netskope DSPM screens such as Policy Management and Classification Management. |
| Infrastructure Connection Name | Enter the exact name of the AWS, GCP, or Azure Account as it is defined within the Infrastructure Connection screen in the DSPM console. |
For example, attempting to onboard a Data Store within the Netskope DSPM application looks something like this:

Visualizing the Output Once you enter the values above, a valid row in your text file should look exactly like this:
example.us-west-2.rds.amazonaws.com:3306,netskope_user,Password123,Production_DB,aws-sandbox
Run Script
- Open the command line interface (CLI).
- Enter the following command to download the automation script locally in your system:
wget https://dasera-release.s3.us-west-2.amazonaws.com/mysql_onboarding.py
- If necessary, navigate to the directory where the script was downloaded.
- Enter the following command to run the script:
python mysql-onboarding.py
- When prompted, enter the following parameters:
| Parameter | Value |
|---|---|
| CSV file name | Enter the file path (relative location) of the CSV text file you created in the Setup Input File section. |
| Netskope DSPM user name | Enter the username of a Netskope DSPM Platform User. Requirement: This user must have RBAC permissions to connect Data Stores. Note: The system uses this identity to log the onboarding event in the User Activity Log. |
| Password | Enter the password that corresponds to the Platform User specified above. |
| Netskope DSPM endpoint | Enter your full tenant URL, including the protocol (https). Example: If your tenant is accessed at https://example.dasera.io, enter that full URL. |
Script Execution & Output
The script processes each row of the CSV text file and attempts to connect each Data Store. For each processed row, the script outputs a response code:
- Code 200: Indicates a successful connection.
- Any other value: Indicates an issue that should be investigated further (see Review Results below).
When complete, the script will output the following message, where # matches the number of rows processed:
Onboarded # Data Stores.
Review Results
Validate Data Store States
While the script successfully establishes a network connection to your data stores, it does not validate the internal configuration requirements, such as permission levels or credential accuracy.
If the configuration is incorrect (e.g., the service account lacks required permissions), Netskope DSPM indicates the failure in two ways:
-
Visual Indicator: A Red status icon appears in Data Stores > Data Store Inventory > Connected.

-
System Logs: An error message is recorded in Activity Logs > System Activity. These messages typically start with “Netskope DSPM encountered an error while scanning data warehouse” and include specific details about the failure.

Once you resolve these issues within the data store itself, Netskope DSPM automatically detects the fixes during the next scheduled scan.
Configure Individual Features
When using this automation script, Netskope DSPM applies a standard set of default configurations to every onboarded Data Store. However, you may need to adjust these settings to match specific security policies or performance requirements.
You can modify these settings at any time by navigating to the Data Stores > Data Store Inventory screen and editing the specific Data Store.
The table below outlines the default settings applied by the script and notes any special considerations:
| Feature | Default Value | Can Be Overridden? |
|---|---|---|
| Scan Frequency | Once daily | Yes. You can increase or decrease this frequency based on your needs. |
| Data Sets | All data sets. | Yes. You can restrict scanning to a specific subset of data if required. |
| Discovery | Enabled | No. This core feature is always enabled to ensure visibility. |
| Privilege Analysis | Disabled Note: MySQL version 8.0 or higher is required for this capability. | Yes. Enable this to detect over-privileged users. Requirement: MySQL version 8.0 or higher. |
| Classification | Enabled | Yes. Determines if the data should be scanned for sensitive content. |
| Data In Use Monitoring | Disabled Warning: Enabling query logging on a MySQL database may impact its performance. Once you have completed these configurations, closely monitor your database along with any pipelines / applications that are dependent on it. | Yes. Warning: Enabling query logging may impact database performance. We recommend monitoring dependent applications closely when this is active. |
| Automation | Enabled | No. This feature is always enabled. |

