MySQL action returns “Unknown initial character set index '255' received from server” error.
search cancel

MySQL action returns “Unknown initial character set index '255' received from server” error.

book

Article ID: 430051

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

While running  “Execute SQL Query on MySQL” action, the following error is returned:

Action Type: Execute SQL Query on MySQL 

   Action State: false 

   Action Description: <u> An error occurred during database connection establishment</u><br/><b>Failed to get connection for: jdbc:mysql://hostname:port/database<br>Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.</b><br/>error code: 0 

   Action Status: FAILED_PAUSED 

Environment

Release Automation 6.8 and 6.9

Resolution

This error is related to a mismatch between the encoding of the target database. The problem may occur when a change is made in the target database like upgrading to a new version.

The solution is to add the connection string in the action definition, but including the "characterEncoding" parameter:

The string should looks like this:

jdbc:mysql://{serverName}:{serverPort}/{databaseName}?characterEncoding=latin1

NOTE: On this example, “latin1” is used, but it could be another like “utf8mb4”, depending on target database.