MySQL, PHP, Tips, Tutorials

‘mysql’ is not recognized as an internal or external command.

02 April 2019

Be sure that your mysql\bin folder is part of your $PATH variable:

  1. Go to Control Panel -> System -> Advanced
  2. Click Environment Variables
  3. Under System Variables find PATH and click on it.
  4. In the Edit windows, find the end of the string of paths (each path needs to be separated by a semi-colon “;” so you may need to add that to the end) add the path to your mysql\bin folder to the end paths.

    For Example,


  5. Go back to Desktop
  6. Close any command prompts you may have open Got to do this so the new $PATH variable will load.
  7. Re-open command prompt. Try running mysql -u root and if the path was set correctly, mysql will now run.

Leave a Comments