Someone sent me email (don't do that if you aren't a customer - post here) with this problem:
Seems like none of the standard commands are working on my terminal It logs me in ok with my welcome screen but up top it reads Last login: Wed Mar 2 10:56:54 on ttyp1 Welcome to Darwin! -bash: export: `/bin:/sbin:/usr/bin:/usr/sbin': not a valid identifier -bash: export: `/usr/local/mysql/bin:': not a valid identifier My-Computer:~ user$ What lead to this problem is when I was trying to install mysql on my powermac G4, I was going off of a book of instructions from mac OS X web development book, everything was going find up until the last few instructions then it error msg ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIVILEGES ON *.* TO mysql@localhost IDENTIFIED BY 'mypassword'' at line 1 mysql> It began to get messy before the error msg concerning bash when on step 9 where the command is Echo 'export PATH=/usr/local/mysql/bin: $PATH' >> ~/.bashrc I wasn't sure if I was even suppose to do this because I think I already have bash and tcshrc on my mac It followed by having me to a touch .bash_profile then ls -Ga l to see the list which it did but then Doing .~/.bashrc ENV=$HOME/.bashrc export ENV it got messy again and when it asked to save :w apparently that command meant to sort and it continued to get messy not sure what it actually did I managed to still find my way to step 10 and it seem to accept password but then that's when the error msg appeared Currently, anytime I try to enter a command it reads -bash: command not found even to list directory still not working Not sure where to go from here any ideas ? Thank you for your time basically no commands work in the terminal all i get is this Welcome to Darwin! -bash: export: `/bin:/sbin:/usr/bin:/usr/sbin': not a valid identifier -bash: export: `/usr/local/mysql/bin:': not a valid identifier I'm using mac os x 10.3.7
What's happened is that's he's messed up his .bash_profile and possibly .bashrc
I can't really tell why from the mail; possibly bad quoting (" or ` vs ' in following the directions), but it doesn't really matter. Do this
Or use Finder to rename these graphically..
then logout and log in again. Figure out what happened, fix it and put 'em back.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2009-11-07 Tony Lawrence