pt-slave-restart command not found

In this troubleshooting guide we learn how to fix pt-slave-restart command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

pt-slave-restart: command not found

or when using sudo you get the following error message

sudo: pt-slave-restart: command not found

Solutions to pt-slave-restart: command not found

How To Fix pt-slave-restart: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pt-slave-restart is provided by percona-toolkit package.

percona-toolkit is:

Percona Toolkit is a collection of advanced command-line tools to perform a variety of MySQL and system tasks that are too difficult or complex to perform manually, including:

  • Verify master and replica data consistency
  • Efficiently archive rows
  • Find duplicate indexes
  • Summarize MySQL servers
  • Analyze queries from logs and tcpdump
  • Collect vital system information when problems occur

To fix this problem, we can install more using the command below.

sudo apt-get -y install percona-toolkit

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install percona-toolkit.

sudo apt -y install percona-toolkit

Or if you have aptitude installed you can use the following command.

sudo aptitude install percona-toolkit

Summary

In this tutorial we learn how to fix pt-slave-restart command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.