Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run OS X.

Following these directions (Installing MySQL on Mac OS X) I added a file to /usr and the contents were

PATH=/usr/local/mysql/bin:$PATH

Actually I was trying to get the mysql command to work now I cannot access terminal. All I get is a cursor but no command line. I also cannot find the file I created in the Finder. I used command shift G to find the folder /usr and the file is not there.

share|improve this question
    
You could try installing another terminal emulator and try to fix the situation through it. –  lanzz Jun 5 '12 at 20:34
    
Note that you can open the Terminal preferences and under Startup tab, you can set Shell open with to /bin/bash. –  Harold Cavendish Jun 5 '12 at 20:46
    
I tried Harrold's suggestion and it did nothing. You might be right that this is not what caused the problem. Around this time I was also logging into mysql directly through its path in /usr/local/mysql/bin/mysql –  user138304 Jun 5 '12 at 20:53
    
.profile perhaps? I was following these directions techxplorer.com/2011/03/03/installing-mysql-on-mac-os-x Step 6 –  user138304 Jun 5 '12 at 20:55
    
Please answer your own question as soon as you can (i.e. in a couple of hours). There's a button below for that. Don't put the solution into the question. Thanks for sticking around! –  slhck Jun 5 '12 at 21:31
add comment

2 Answers 2

up vote 1 down vote accepted

I Solved the problem by restarting my computer. I am really not sure what the problem was.

I got the idea because Could not open a new pseudo-tty. appeared in my terminal after following slhck directions to remove my .profile file. then i searched google and found this; http://blogs.oreilly.com/digitalmedia/2008/03/fixing-terminal-tty-errors.html.

Thanks

share|improve this answer
add comment

Why is your bash not starting up?

If your bash is not starting up correctly, one of its configuration files is borked. These are:

  • /etc/profile

And after that, the first one of these it can find:

  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile

If you followed that tutorial correctly, you created the ~/.profile file. But not in /usr. It should reside in your $HOME directory, which is at /Users/your-username, and known as ~ to the shell. You can put anything you want into /usr and it wouldn't affect bash starting.

Let's remove ~/.profile

Try to go into Terminal.app settings and changing the following:

The command you want to execute is:

/bin/rm /Users/your-username/.profile

Don't forget to untick Run inside shell. Of course, change your-username to your actual short user name. Once you open that Terminal profile, your existing .profile file will be deleted.

You can then uncheck the Run command field and try to start over.

Other means of debugging

If the above didn't help, from the same Run command field, try running:

/usr/bin/tail -n 10 /Users/your-username/.bash_history

This will trace back your last steps, which would be valuable information to add to your post.

Your Terminal shows Could not open a new pseudo-tty?

In that case, a reboot is needed. Somehow you created too many forks, exceeding the file system limits. This should be restored by simply rebooting your Mac.

share|improve this answer
    
Here is my history /usr/local/mysql/bin/mysql cd /usr/local/mysql ls ls ls ls ls /usr/local/mysql/bin/mysql cd ~ vi .profile However I restarted and the problem went away. Apparently it helps. –  user138304 Jun 5 '12 at 21:24
    
How far did you get with vi? Were you able to save and quit? Well, anyway, if your problem is solved … –  slhck Jun 5 '12 at 21:25
    
I was able to save and quit. –  user138304 Jun 5 '12 at 21:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.