Skip to main content
Skip table of contents

MySQL troubleshooting

This troubleshooting section describes the common pitfalls and errors around configuring, linking, and provisioning MySQL datasets and provides possible solutions. This section explains the following in detail:

  • Connector logs and the path at which these logs are generated. These logs contain information regarding the flow of events, failure regarding any MySQL command failures, trace messages, etc.

  • Common MySQL commands. These commands will help you understand how to check replication status, user permissions, etc

  • Exit Codes and actions that users can take in case of any error.

  • Version compatibility. This guides the user to upgrade from MySQL version 5.7 to 8.

If the user is still not able to resolve the error, please reach out to Delphix Support.

Logs

There are 2 sets of logs for the MySQL plugin:

  1. Plugin Logs: Plugin logs are part of the Delphix Continuous Data Engine. Refer to How to Retrieve Logs to find out how to get the Delphix Continuous Data Engine Plugin Logs.

  2. MySQL Shell Operation Logs: When the plugin performs certain operations (such as Take backup, Link, Provision, etc.), logs are written to log files on the staging or target host under the Delphix Continuous Data Engine Toolkit directory.

Following are the logs to review:

  • delphix_mysql_user_mysql_debug.log

  • delphix_mysql_user_mysql_info.log

  • delphix_mysql_user_mysql_error.log

Common MySQL commands

  • Connecting to a MySQL instance

    CODE
    delphixos> /usr/bin/mysql -u UserName -p Password --protocol=TCP --port=1234
  • List databases in MySQL

    CODE
    mysql> show databases;
  • Check the replication status in MySQL

    CODE
    mysql> show replica status;
  • Check binary logging

    CODE
    mysql> show variables like 'log_bin';
  • Check user permissions

    CODE
    mysql> show grants for 'delphixdb'@'%';

MySQL Plugin exit codes

The below tables include exit codes that the MySQL connector (plugin) presents if an error occurs.

Exit Code

Description

Possible Reason

1

General Error

Check logs

2

General Error

Check logs

3

Unable to start MySQL

  1. Delphix user does not have the necessary permissions on the host

  2. Mount location provided is in use

  3. Database credentials provided are not accurate

  4. Invalid server-id

  5. Provided port is not in use

4

Missing config file

A my.cnf file was not provided and Delphix was unable to create one.

5

Unable to change root password

Delphix was unable to change the password for the root user after creating the staging db.

Please check logs.

6

Unable to restore backup

Delphix was unable to restore the full backup into staging db. Please check logs.

7

Connect failure post restore

Delphix is unable to connect to the staging database after backup is restored.

  1. The Source DB username and password provided may be incorrect.

  2. The MySQL Database did not restart after the restore.

Check logs for more information on the error.

8

Delphix backup failure

Delphix could not take a source database backup.

  1. Staging Host may not be able to connect to Source Host

  2. Source DB credentials may be incorrect

  3. Source DB user may not have the required permissions

  4. Databases provided in the list may not be present on the source MySQL instance.

Check logs for more information on the error.

9

Customer backup failure

There was an issue with the customer provided backup. 

  1. Backup location may not exist.

  2. The backup file may not exist

  3. Backup file may be empty.

Check logs for more information on the error.

10

Invalid binary path

mysql was not found under the provided installation directory.

11

Connect failure after restart

In Staging Push Mode, the Delphix source user could not connect to the MySQL instance after reboot.

Check logs for more information on the error.

12

Unable to create user

In Staging Push Mode(Staging Push), there was an error while creating the delphix user after staging db was initialized.

Check logs for more information on the error.

13

An error occurred while starting replication

Check the provided credentials if they are valid

14

An error occurred while granting the permissions

Check the logs for more information, permission error for performing operation. Try creating dSource again.

15

An error occurred while starting replication

The user has selected to provide a different replication user and password but the provided replication user or password is empty

Version compatibility

The MySQL connector requires that the staging and target environment’s MySQL major versions match. This also means that any snapshot’s MySQL version must match the installation on the Target environment. This applies to all VDB operations, such as provision, rollback, and refresh. The operation will fail if the two versions are different, such as MySQL v5.7 on Staging and v8 on Target.

MySQL, unlike other databases, does not support automatic upgrades.

Guidance on how to upgrade your staging environments, target environments, and VDBs can be found in the Upgrading dSources and VDBs MySQL database versions section.

In version 4.1.0 of the MySQL connector, we have introduced guardrails to minimize accidentally broken VDBs when refreshing from a lower versioned dSource. A sample screenshot can be seen below.

borken vdb.jpg

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.