MySQL Backup Failure: Incorrect Socket Path

In the Controller high-availability setups, the MySQL data backup fails because the migration tool is unable to find the mysql.sock file. Following is a sample error pattern:
CODE
Can't connect to local MySQL server through socket '/home/appdynamics/appdynamics/platform/controller/db/mysql.sock' (2)

The MySQL socket path of the Controller high availability setup is different from the standalone Controller. If the correct socket path is not updated in the config.yaml file, the MySQL data backup fails.

In config.yaml, replace the MySQL socket path as follows:

  1. Stop the migration tool.
  2. Go to /home/appduser/migration-tool/config .
  3. Edit the config.yaml file.
    CODE
    vi config.yaml
  4. Go to the services.controller.source_database section.
  5. Replace the existing MySQL socket path (socket_path: {HOME}/{Controller_Path}/db/mysql.sock) to the following:
    JSON
    socket_path: {HOME}/{Controller_Path}/db/data/mysql.sock
  6. Start the migration tool.
    CODE
    nohup python3 ./migration_tool.py migrate all &MySQL Backup Failure: Incorrect Socket Path