wood burning stoves 2.0*
The moose likes Mac OS and the fly likes command not found error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "command not found error" Watch "command not found error" New topic
Author

command not found error

Dustin Schreader
Ranch Hand

Joined: May 25, 2009
Posts: 102
Hello, I'm new to mysql but I use flamerobin. I have followed the directions and setup mysql with passwords to the root accounts so far. I exited out of my sql and now when I try to use the mysql -u root -p function it says command not found. Any ideas what I'm doing wrong? Thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That's what it says when you type that string on the Windows command line? Then it means the "mysql" command (i.e. executable) isn't in your Windows path. (Which is nothing to do with JDBC.) The easiest way to fix that is to change your current working directory to the folder which contains mysql.exe before executing that command.
Dustin Schreader
Ranch Hand

Joined: May 25, 2009
Posts: 102
Sorry I just saw Sql so I figured I could post here. I'm using mac and I have mysql in the path.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Let's try the Mac forum then...
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2835
    
  11

Macs use paths too. If you type "which mysql" at a terminal command prompt, it should tell you where mysql is located. If it says it can't find one, then your path could be wrong. You will either need to type the full path to the mysql command, or alter your path environment variable. There's also a chance that mysql has been marked as not executable by whatever user you're logged in as. In that case, a chmod command would be needed. Let us know what you find out and we can give more targeted advice!
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

There are a bunch of strange setup issues with using a LAMP stack on OS-X. There is a trivial solution, use a MAMP stack, which is design for Macs. Hence the first name.
 
wood burning stoves
 
subject: command not found error
 
Similar Threads
Schema Export Unsuccesful
How to set administrative user in MySQL?
export database in mysql
how to get mysql backup using java swing
strange problem when accessing MySQL