Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Denarius

macrumors 6502a
Original poster
Feb 5, 2008
690
0
Gironde, France
I just compiled mysql and discovered that I would have to type
Code:
shell:~ sudo mysqld_safe --user=mysql &

Apparently the & symbol is there to make it run in the background, but I'm finding it's having an odd effect on the terminal window and seems to cause sudo to jump over the password prompt.

Code:
Last login: Fri Oct 17 10:32:30 on ttys000
PennyMBP:~ adam$ sudo mysqld_safe --user=mysql &
[1] 185
PennyMBP:~ adam$ Password:

Type the password at the prompt and it's not actually receiving a password.

Can anyone repeat this behaviour? Do you think it's a bug in terminal or have any other explanation?

Thanks folks.
 
Agreed, not a bug.

If it is in the background, it is in the background and not interactive anymore.

One option may be to start the program in the foreground as normal, enter the password, then hitting CTRL+Z an enter the command bg.

Code:
sudo mysqld_safe --user=mysql
[password]
[CTRL-Z]
bg
 
Agreed, not a bug.

If it is in the background, it is in the background and not interactive anymore.

One option may be to start the program in the foreground as normal, enter the password, then hitting CTRL+Z an enter the command bg.

Code:
sudo mysqld_safe --user=mysql
[password]
[CTRL-Z]
bg

I didn't know about Ctrl+Z, thank you for the tip!

While scouting around on this problem, I found a nice launchd approach on HiveLogic that works very nicely indeed if you want it to start and stop on startup and shutdown and lets you launch/kill manually through launchctl.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.