How to set environment variable for MySQL in windows 10 | MySQL setting up the Environment Variable

Опубликовано: 15 Апрель 2020
на канале: Engineers Revolution
25,892
169

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)


Смотрите видео How to set environment variable for MySQL in windows 10 | MySQL setting up the Environment Variable онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Engineers Revolution 15 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 25,892 раз и оно понравилось 169 людям.