mysql : The term ‘mysql’ is not recognized as the name of
a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
It must have already been resolved for you, but still dropping this comment so that someone else stuck on this won’t have to spend much time.
-Check for the path of MySQL.exe by searching in file explorer. Copy the address- “C:\Program Files\MySQL\MySQL Server 8.0\bin” (in my case)
-Please add this MySQL path to Windows environment variable by following the below steps-
Right click on My Computer/ This PC> Properties> Search for Advanced system settings> Advanced tab> Click on Environment variables. Under system variables> check for path> click on edit> you can click on new and add the path for MySQL(in Windows 10). It might be a little different in the other versions.
-Once you have added in the environment variable, please execute the command “mysql -u root -p” in Command prompt and see if it works there. If it’s prompting you to enter a password that would mean you have done the right thing.
-Close visual studio- Restart it- open your storefront folder and you can try running the command in the terminal. It will work once you have restarted Visual studio!
yes, it worked for me , thanks for posting