mysql is not recognised as an internal or external

2019-01-21 16:17发布

I had set the MySQL path, but still getting the same error. Please let me know whether I followed the correct one or not.

MySQL location is: C:\Program Files\MySQL\MySQL Server 5.0\bin

In Windows, system variables I had set the path as:

  • variable name: MYSQL_HOME
  • variable value: C:\Program Files\MySQL\MySQL Server 5.0\bin

For PATH setting:

  • variable name: PATH
  • variable value: .;%JAVA_HOME%\bin;%MYSQL_HOME%\bin...

If it is not the correct one, please let me know the correct path and its settings.

7条回答
啃猪蹄的小仙女
2楼-- · 2019-01-21 16:29

I am using xampp. For me best option is to change environment variables. Environment variable changing window is shared by @Abu Bakr in this thread

I change the path value as C:\xampp\mysql\bin; and it is working nice

查看更多
Luminary・发光体
3楼-- · 2019-01-21 16:31

In my case, it turned out to be a simple case of spacing.

Turns out, i had a space inserted after the last ; and before ""C:\Program Files\MySQL\MySQL Server 5.7" For this very simple reason, no matter what i did, MySql was still not being recognized.

Once i eliminated the spaces before and after path, it worked perfectly.

In retrospect, seems like a very obvious answer, but nobody's mentioned it anywhere.

Also, i'm new to this whole windows thing, so please excuse me if it sounds very simple.

查看更多
\"骚年 ilove
4楼-- · 2019-01-21 16:32

enter image description hereHere what I DO on MY PC I install all software that i usually used in G: partian not C: if my operating system is fall (win 10) , Do not need to reinstall them again and lost time , Then How windows work it update PATH automatic if you install any new programe or pice of softwore ,

SO

I must update PATH like these HERE! all my software i usually used 1- I created folder called Programe Files 2- I install all my programe data in these folder 3-and then going to PATH and add it Dont forget ;

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;G:\HashiCorp\Vagrant\bin;G:\xampp\php;G:\xampp\mysql\bin;G:\Program Files (x86)\heroku\bin;G:\Program Files (x86)\Git\bin;G:\Program Files (x86)\composer;G:\Program Files (x86)\nodejs;G:\Program Files (x86)\Sublime Text 3;G:\Program Files (x86)\Microsoft VS Code\bin;G:\Program Files (x86)\cygwin64\bin

enter image description here

查看更多
等我变得足够好
5楼-- · 2019-01-21 16:33

In my case, I resolved it by adding this C:\xampp\mysql\bin path in system variables then restarted cmd.

Note: Click me if you don't know how to set the path and system variables.

查看更多
beautiful°
6楼-- · 2019-01-21 16:37

Simply type in command prompt :

set path=%PATH%;D:\xampp\mysql\bin;

Here my path started from D so I used D: , you can use C: or E:

enter image description here

查看更多
Fickle 薄情
7楼-- · 2019-01-21 16:43

MYSQL_HOME:

C:\Program Files\MySQL\MySQL Server 5.0

Path:

%MYSQL_HOME%\bin;
查看更多
登录 后发表回答