Configure Connection
MySQL / MariaDB guide
Install the .NET connector, prepare a database account, and configure and test MySQL or MariaDB access in NIM.
Before you startDirect link to Before you start
NIM requires Server hostname, Port, SSL mode, Database, Username, and Password. Have a database administrator prepare an account that can connect from the NIM server and access the data your process needs.
Install the MySQL .NET ConnectorDirect link to Install the MySQL .NET Connector
This integration requires the MySQL .NET Connector on the NIM server. If it is missing, the system's properties page displays a warning and a PowerShell installation command.
- Copy the installation command displayed by NIM.
- Run it in an elevated PowerShell prompt on the NIM server.
- Return to NIM and confirm that the warning disappears before configuring the connection.
Create the userDirect link to Create the user
Run the following SQL as a database administrator. Replace nim_user, NIM_SERVER_IP, and the password with your integration's values:
CREATE USER 'nim_user'@'NIM_SERVER_IP'
IDENTIFIED BY 'REPLACE_WITH_A_SECURE_PASSWORD';
The host portion identifies where the client connects from, not the database server. Use the NIM server's source IP or an appropriate allowed host. Use localhost only when NIM connects locally on the database host. The % host pattern permits connections from any host that can reach the server; use a specific host where possible.
Grant database accessDirect link to Grant database access
Replace nimdata with the target database name and use the same account and host as in CREATE USER. Choose the permissions needed by your process.
Source data collectionDirect link to Source data collection
GRANT SELECT ON nimdata.* TO 'nim_user'@'NIM_SERVER_IP';
Data reads and changesDirect link to Data reads and changes
For processes that need full CRUD on records:
GRANT SELECT, INSERT, UPDATE, DELETE
ON nimdata.* TO 'nim_user'@'NIM_SERVER_IP';
Omit DELETE if deletion is not required. These grants permit data changes without granting database administration privileges.
Optional database-wide privilegesDirect link to Optional database-wide privileges
If the process requires broader privileges on the selected database, the administrator can instead grant:
GRANT ALL PRIVILEGES ON nimdata.* TO 'nim_user'@'NIM_SERVER_IP';
CREATE USER and GRANT do not require a subsequent FLUSH PRIVILEGES. Open a new connection to validate the configured access. See the MySQL privilege reload reference, MySQL GRANT reference, and MariaDB GRANT reference.
Enter the connection settingsDirect link to Enter the connection settings
- In NIM Studio, open Systems > Overview and add a MySQL system, or select the existing system for your MySQL or MariaDB database.
- Open its Connection screen.
- Enter the following settings and save the connection.
| NIM setting | Value |
|---|---|
| Server hostname | The hostname of the MySQL or MariaDB server. |
| Port | The database connection port supplied by your administrator. |
| SSL mode | The connection's SSL/TLS mode, matching the server configuration and your organization's requirements. |
| Database | The target database name. |
| Username | The database username, such as nim_user. The allowed client host is configured on the database account. |
| Password | The password assigned to that account. |
Test the database connectionDirect link to Test the database connection
- Select Test Connection. NIM attempts to open a connection to the configured database.
- Confirm that the connection opens successfully. If it fails, check the connector installation, hostname, port, SSL mode, database, credentials, and account's allowed client host.
- Collect the system and inspect the expected tables or query results.
- If connection succeeds but collection fails, verify the account's permissions on the required database objects.
- Validate the collected records and matching rules before using MySQL or MariaDB as source or supplemental data for automation.
A successful connection test does not confirm permission for every operation. Validate collection and any intended create, update, or delete operations separately.