It is assumed that the user has already installed MySQL on Windows operating system. The user is trying to access through the Windows command prompt and get the error “PHP is not recognized as the internal or external command” in the windows command prompt. The user needs to place the PHP folder to the location of the "System Environment Variable".
Copy to PHP folder location path:
In window 10 or any other operating system locate the folder like;
- C > Xammp > PHP and copy the path of PHP folder.
- Open control panel and click on “System Environment Variable”.
- Open the “advance” tab and click on the “environment variables”.
- On this dialog box select the “path” under “System Environment Variable”.
- Click the Edit button.
- On the new dialog box click the “new “ and paste the PHP folder location which already copied. The PHP folder location was “C:\xammp\php.
- Click Ok and launch the "Window Command Prompt" and type following lines;
Before setting the path for your environment variable must test the folder from your command prompt and then execute the command. And also make sure you are opening the command prompt as an administrator mode.