0

i have installed mysql community, but when i write the comand mysql -u root -p windows says the command not exist...how can i resolve it?

fenigo69
  • 53
  • 1
  • 8
  • `'mysql' is not recognized as an internal or external command, operable program or batch file`? Take a look at your environment variables ... run `ECHO.%PATH:;= & ECHO.%` in a new cmd and check if there is something related to MySQL. – ROMANIA_engineer Jan 15 '16 at 19:55
  • exact, right this problem – fenigo69 Jan 15 '16 at 19:56
  • no,there is nothing for mysql – fenigo69 Jan 15 '16 at 20:00
  • Ok, then this is your problem. Add MYSQL_HOME=your_main_path_to_MySQL as an environment variable. Then add `;%MYSQL_HOME%\bin` at the end of the path (click by click ...). Here are some similar steps for Java: http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7/34808710#34808710 . You can take a look if you don't know how to do it. – ROMANIA_engineer Jan 15 '16 at 20:01
  • somenthing like this? `MYSQL_HOME = C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MySQL\MySQL Server 5.7%MYSQL_HOME%\bin` – fenigo69 Jan 15 '16 at 20:06
  • There is a `.` in my comment between 2 sentences. Don't merge them. That `;%MYSQL_HOME%\bin` will be added at the end of `Path` value, not at the end of `MYSQL_HOME` value. `Path` is another variable there. Find it. If you don't manage to do it, you have one more ugly option - run `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MySQL\MySQL Server 5.7\bin\mysql` from command line instead of `mysql`. – ROMANIA_engineer Jan 15 '16 at 20:08
  • so variable name=`MYSQL_HOME` and variable value= `C:\Program Files\MySQL\MySQL Server 5.7\bin;%MYSQL_HOME%\bin` right? – fenigo69 Jan 15 '16 at 20:15
  • ok i have resolve, thank you so much – fenigo69 Jan 15 '16 at 20:56

0 Answers0