MySQL

3 minute readExtensibilityDeveloper productivity

MySQL is the world’s most popular open source database. Some of the main MySQL features are:

  • Scalability and flexibility

  • High performance

  • High availability

  • Robust transactional support

  • Web and Data Warehouse strengths

  • Strong Data Protection

  • Ease of management

  • Lowest total cost of ownership

    The EC-MySQL plugin interacts with the MySQL command-line tool, `mysql`. The `mysql` utility allows you to perform queries against the database from text areas or a SQL file. You can also apply custom formatting to output such HTML or XML. You can find more information at http://www.mysql.com/[this website].

Plugin Version 2.0.14.2021021708 Revised on Feb 17, 2021

Integrated version

This plugin was developed and tested against version 5.0.89.

Plugin procedures

For all of the following parameter descriptions, the required parameters are in bold italics.

Plugin configuration

Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They are intended to reduce repetition of common values, create predefined sets of parameters for end users, and to securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on the procedures that use them.

Plugin configurations are created in CloudBees CD by going to the "Administration" tab and then to the "Plugins" subtab. The "Configure" link is on the right side of the row for the specific plugin, which will open the Configuration page.

ParameterDescription

Configuration Name

Provide a unique name for the configuration. (Required)

User Name

Provide the user login ID. Login IDs are case sensitive. (Required)

Password

Provide the user-specified password. (Required)

ExecuteSQL

The ExecuteSQL procedure creates and executes a command line from the parameters that you provide in the procedure form.

ParameterDescription

Configuration name

The name of the configuration that contains the user and password to connect to the database server. (Required)

Mysql command line utility

Absolute path to the MySQL command-line tool. (Required)

Database name

Name of the database. This is the command-line '--database' option. (Required)

Server

The name or IP address of the server to which you want to connect. This is the command-line '--host' option. (Required)

Port

Database port. Default value is 3306. This is the command-line '--port' option. (Required)

Output format

Choose the output display format.

Report name

Name of the report that will be created after the query is run (without an extension).

SQL file path

Provide the absolute path to a SQL file that you want to run.

Query

Provide any query you want to run against the database. This is the command-line '--execute' option.

Additional commands

You can enter these additional commands:

--table: This displays output in tabular format.

--verbose: This enables verbose mode.

You can find more commands at this website

Working directory

Directory where the job will be executed.

Result (output property path)

Property name used to store the result of the queries.

Examples and use cases

Creating a configuration

Stored configurations are available here

Executing a simple "select * from person"

Expected output when you provide the "text" output format

Expected output when you provide the "html" output format

Expected output when you provide the "xml" output format

The same with some additional commands

Expected output for the previous example

Release notes

EC-MYSQL 2.0.14

  • Updated catalog metadata

EC-MYSQL 2.0.13

  • The documentation has been migrated to the main documentation site.

EC-MYSQL 2.0.12

  • Renaming to "CloudBees CD"

EC-MYSQL 2.0.11

Renaming to "CloudBees"

EC-MYSQL 2.0.10

  • Configurations can be created by users with "@" sign in a name.

EC-MYSQL 2.0.9

  • The plugin icon has been updated.

EC-MYSQL 2.0.8

  • Improved error handling. Query and SQLFilePath parameter are incompatible now.

EC-MYSQL 2.0.7

  • Fixed issue with configurations being cached for IE.

EC-MYSQL 2.0.6

  • Renamed ElectricCommander to ElectricFlow.

EC-MYSQL 2.0.4

  • Fixed incorrect plugin behavior with non-unicode characer sets.

  • Added field ConnectionEncoding in SQLExecute form, which allows the plugin to work correctly in any encoding. Default encoding - UTF8.

EC-MYSQL 2.0.3

  • Fixed an error during sql execution from file.

  • Fixed error with plugin crash when reportName presents.

EC-MYSQL 2.0.2

  • Fixed the bug where the clear text password appeared in the commandLine property created by the Execute SQL procedure.

EC-MYSQL 2.0.1

  • Improved error handling.

  • Added postp matchers.

  • Fixed the configuration list columns.

EC-MYSQL 2.0.0

  • Added the result (output property path) parameter.

EC-MYSQL 1.0.2

  • Changed procedure names in the step-picker section.

EC-MYSQL 1.0.1

  • XML parameter panels.