Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting MySQL path in command prompt

How can I get the mysql installation path up to bin folder using command prompt in windows.Is there any command to get the location of mysql installation path?

like image 550
rakesh menon Avatar asked Feb 11 '13 03:02

rakesh menon


People also ask

What is the path of MySQL?

If the MySQL programs are installed in /usr/local/mysql/bin and the user wishes to make it easy to invoke these programs, the value of the PATH environment variable can be set to include that directory. Before trying to add MySQL to Windows path, ensure that MySQL has been installed properly.


1 Answers

(if I get your question correctly) Like you wold add any other directory to path

set PATH=%PATH%;C:\DirectoryToAdd\ToPath

It doesnt metter if you add %PATH% on, beginig or on the end, but you must add it, otherwise your path will only be your new directory.

Find mySql installation directory ( for example C:\Program Files\MySQL\MySQL Server 5.6\bin) and then type the comand above set PATH=%PATH%;C:\Program Files\MySQL\MySQL Server 5.6\bin

tips:

  • in cmd use PATH to see what is your path (I think every body knows this, but it cant hurt) And see something more about PATH command

  • Your mySql servce must be turned on to execute commands.

  • In Windows explorer if you type cmd.exe in Windwos Explorer Address Bar you will get cmd running from that directory.
like image 82
1392023093user Avatar answered Oct 24 '22 16:10

1392023093user