Reputation: 117
I've installed MySQL 5.7 on windows 10 and can get it to work from the workbench but every time I try to launch it from the powershell it gives me this error.
Help anyone?
Thanks
Upvotes: 1
Views: 12123
Reputation: 11451
This error is because. The mysql is not added in the path of the windows. Thats why this happens. Initially grab the location of mysql.exe. find it from the installation directory.
In my case mysql.exe is in the folder C:\xampp\mysql\bin
yours may vary depending upon your installation.
Then right click on This Pc->Properties-> Advanced System Settings(on the left side).
you will get a dialouge box. Click on environment variables Image
Find Path under system variables(Bottom side of the popup window). Click EditImage
Click New on the right side. Paste the path of mysql there. Click OK. Then Restart power shell
Now Mysql command should be working.
Upvotes: 1