Adding MySQL to PATH Environment Variable in Windows
MySQL Installer by default doesn’t add the mysql.exe to the PATH environment variable. As a result, every time we want to execute mysql.exe we have to specify the full path to it. The mysql.exe resides in the MySQL\MySQL Server 5.7\bin directory. But the path to MySQL directory depends upon the architecture of the application. If you have installed x64 version then it should be in C:\Program Files. Otherwise, it should be in C:\Program Files (x86). On this system, MySQL is installation is in C:\Program Files\ and the complete path to mysql.exe is C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe.
To add mysql.exe to PATH environment variable follow these steps:
1. Hit Win+Pause/Break. This will open System Properties Window.
2. Click on Advanced system settings.
3. At the bottom of the newly opened window click on Environment Variables.
4. In the new window Select Path environment variable and click Edit.
5. Add ; at the end of the current variable value and append C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe (the exact may differ depending upon version and architecture of the application). Click OK to save.
Now start the Command Prompt and enter the following command:
mysql --version
mysql Ver 14.14 Distrib 5.7.20, for Win64 (x86_64)
Watch video How to set environment variable for MySQL in windows 10 | MySQL setting up the Environment Variable online without registration, duration hours minute second in high quality. This video was added by user Engineers Revolution 15 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 25,892 once and liked it 169 people.