MySQL Query
Activity Description
Executes a SELECT query on a MySQL database and returns a table.
Output
A ResultSet.
note
To use MySQL activities, you need to install MySQL Connector Net 6.4.4 on the machine where the Resolve Actions Express executor is installed.
After installing the MySQL Connector, edit the activity's configuration by adding the path to the connector as follows:
- In the Resolve database, select the
dbo.TBL_ActivitiesSource
table. - In the
SourceCode
column, search forMySQLQuery
. - In the
Assembly
segment of the activity's XML code, update the path to the connector.
Settings
- Query – The query's text (e.g.,
Select * from hosts
). - Connection String – Specifies the required connection string in order to connect the database.
Example:Server=SRV01;Database=myDataBase;
- User Authentication – Determines whether a user's authentication credentials are required to execute the query (if the credentials are not specified in the clear text connection string).
- User Name – A MySQL user authorized to execute the query (e.g.,
sa
). - Password – The user's password.
note
To avoid translation of %TEXT%
(in case TEXT
is not a variable name), add @
before the percentage character. For example: Select * From TableName Where ColumnName LIKE '@%TEXT%'
.
note
To use the word variable
within a query, use the following convention: @%variable%
(else it is referred to as a system variable).