One of the most popular question I get after watching my MySQL courses on Pluralsight is that beginning users are not able to find where they have installed MySQL Server.
The error they receive is as follows when they type mysqld command on their default command line.
‘mysql‘ is not recognized as an internal or external command, operable program or batch file.
This error comes up if user try to execute mysqld command on default command prompt. The user should execute this command where mysql.exe file exists. If you are using Windows Explorer you can easily search on your drive mysqld.exe and find the location of the file and execute the above command there. However, if you want to find out with command prompt the location of mysqld.exe file you can follow the direction here.
Open command prompt from Start >> Run >> cmd >> enter
You need to change the default directory to root directory, hence type cd\ command on the prompt to change the default directory to c:\ . Here we are assuming that you have installed MySQL on your c: drive. If you have installed it on any other drive change the drive to that letter.
Type the command dir mysqld.exe /s /p on the command prompt.
It will search your directories and will list the directory where mysqld.exe is located.
Now once again change your command prompt file location to the folder where your mysqld.exe is located. In my case it is located here in folder C:\Program Files\MySQL\MySQL Server 5.6\bin hence I will run following command: cd C:\Program Files\MySQL\MySQL Server 5.6\bin .
Now you can once again mysqld.exe on your command prompt.
You can use this method to search pretty much any file with the help of command prompt.
Reference: Pinal Dave (http://blog.sqlauthority.com)