Database

How to fix Mysql is not recognized command Error

How to fix Mysql is not recognized command Error

The MySQL is not recognized as an internal or external command error, meaning the system cannot find the mysql executable in your system’s PATH.

Error

When you issue the MySQL command, you will encounter the following error:

‘mysql’ is not recognized as an internal or external command, operable program or batch file.

 

MySQL is not recognized command

Fix

This issue often occurs due problems with the system’s PATH environment variable.

Verify MySQL Installation

Check if the MySQL database server is installed on the machine.

If the installation is ok.

Add MySQL to PATH Environment Variable

Open the Start Menu and search for “Environment Variables.”

Click on “Edit the system environment variables.”

Click the “Environment Variables…” button in the System Properties window.

In the Environment Variables window, find the “Path” variable under “System variables” and select it.
Click “Edit…” then “New…” and add the path to the MySQL bin directory

For example, C:\Program Files\MySQL\MySQL Server <VERSION>\bin.

Click OK to close all dialogs to save the changes.

Close the command prompt and re-launch it.

Issue the mysql command. This will resolve the issue.

 

MySQL Tutorials

MySQL Tutorials on this website: