If you get the above error in your Windows machine after installing the MySQL Server, make sure you have path name of MySQL bin folder setup to your Windows PATH variable.
Navigate to System -> Advanced system settings -> System Properties -> Environment Variables and edit the System variables PATH as
C:\Program Files\MySQL\MySQL Server 8.0\bin
The path may vary depending on where you have the MySQL Server installed on your system. Restarting the command prompt will allow you to access all features of mysql server, client and command-line utilities form any path.