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\
Here 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
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
MYSQL_HOME:
C:\Program Files\MySQL\MySQL Server 5.0
Path:
%MYSQL_HOME%\bin;
MYSQL_HOME variable value:C:\Program Files\MySQL\MySQL Server 5.0\bin %MYSQL_HOME%\bin
See the problem? This resolves to a path of C:\Program Files\MySQL\MySQL Server 5.0\bin\bin
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.
In my case, I resolved it by adding this path C:\xampp\mysql\bin
to system variables
path and then restarted pash/cmd
.
Note: Click me if you don't know how to set the path and system variables.