I’m using git bash on a windows 7 machine. When I try to use mysqldump I’m getting an error:
“sh.exe”: mysqldump: command not found”. I am very new to this. Can somebody help me?
I’m using git bash on a windows 7 machine. When I try to use
Share
You’ll need
mysqldumpon the path that bash is using to find commands. UN*X shells, like bash, and also windows cmd, use aPATHenvironment variable to manage this.To see your current path, type this in bash:
If you’ve installed MySQL, it’s typically located at
c:\Program Files\MySql, and the support programs, likemysqldump, are inc:\Program Files\MySql\MySQL Server 5.5\bin\. You’ll need to have that directory on your path. If MySQL has been installed somewhere else on your machine then you’ll need to find thebindirectory there and use that path in these instructions.The best way to do this in windows is by changing the user or system environment variables. To do this, in Windows Explorer:
Computerand selectPropertiesfrom the menu.Advanced System Settingsin the sidebar.Advancedtab.Environment Variablesbutton.userat the top, andsystembelow. Either will work, but let’s change thesystemsettings.Pathin theVariablecolumn.Pathrow.Variable valuefield, scroll all the way to the end of the field, and at the end, add this:;c:\Program Files\MySql\MySQL Server 5.5/bin/. Note the leading semicolon: it won’t work without it.OKand now you can close all the dialogs/windows.Once you’ve done all that, close the Git bash window, and open another one. Type:
You should get Usage instructions from the program.
If not, look at the path again by typing:
Do you see anything like what you added? Any MySQL directories there? It’s likely you’ve just mistyped something, or missed the semicolon. Go over the steps again and make sure everything is correct.