Mysql – How to make sure that thesqldump command is working in command prompt

MySQLmysqldump

I'm getting this error:

C:\Users\IT-Admin>mysqldump
'mysqldump' is not recognized as an internal or external command,
operable program or batch file.

Best Answer

So just as dwjv suggested, set the PATH OS system environmental variable to include the path on the OS where the mysqldump.exe exists (http://www.computerhope.com/issues/ch000549.htm); otherwise, change the directory in your command window to that path where it is and then run the command.

  1. Add the full path (exampleC:\Program Files\MySQL\MySQL Server\bin\mysqldump\) where the mysqldump.exe is located to the environmental system variable of the OS where you're running this.

  2. Example:C:\Users\IT-Admin>CD /D "C:\Program Files\MySQL\MySQL Server\bin\mysqldump" and then press enter to get this in the command window where you'd type 'mysqldump' as shown here C:\Program Files\MySQL\MySQL Server\bin\mysqldump>mysqldump and then press enter.

  3. Furthermore, you could put the full path to the mysqldump.exe in with double quotes around it and then press enter as well e.g. "C:\Program Files\MySQL\MySQL Server\bin\mysqldump" and then press enter.

So there are three potential solutions for you!