MySQL – How to Find mysqld.exe with Command Prompt – Fix: ‘mysql’ is not recognized as an internal or external command, operable program or batch file
Posted
by Pinal Dave
on SQL Authority
See other posts from SQL Authority
or by Pinal Dave
Published on Fri, 08 Nov 2013 01:30:23 +0000
Indexed on
2013/11/08
4:03 UTC
Read the original article
Hit count: 857
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.
Step 1: Open a command prompt
Open command prompt from Start >> Run >> cmd >> enter
Step 2: Change directory
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.
Step 3: Search Drive
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.
Step 4: Change Directory
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 .
Step 5: Execute mysqld.exe
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)
Filed under: MySQL, PostADay, SQL, SQL Authority, SQL Query, SQL Tips and Tricks, T SQL
© SQL Authority or respective owner