MySQL validation

Learn how to validate MySQL using the CLI action step and SQL queries.

You can use the CLI action step to perform queries and run validations on MySQL database.

Example code:

const dbName = "XXXXX";
const userName = "XXXXX";
const password = "XXXXX";
const host = "XXXXX";
const port = XXXXX;

const sequelize = new Sequelize(dbName, userName, password, {
  dialect: "mysql",

return sequelize
  .query("SELECT name FROM myTable where id = 1;", {
    plain: true,
    raw: true,
    type: Sequelize.QueryTypes.SELECT
  .then(myTableRows => {
    const result = myTableRows && JSON.stringify(myTableRows);
    console.log("Query result", result);
    if (!myTableRows || !== expectedValue) {
      return Promise.reject(new Error("Failed to find raw"));

Parameters - Packages and JavaScript used in this example: Sequelize, type: Package, value: [email protected] mysql2, type: Package, value: [email protected] expectedValue, type: JavaScript, value: "fdssdf dfdf"

see screenshot: