|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Shell command?
I'm trying to reset my MySQL password in Terminal (OSX user) and am feeling my way through the process, as I know very little Unix. The guide I'm using suggests the following command as the final step:
shell> mysqld_safe --init-file=~/mysql-init & to which Terminal responds (when I do it) with: [1] xxxx thomas-computer:~ root# -sh: shell: command not found or something to that effect. substitue some numbers for the x (typically 1300-1500) The method can be seen here: http://dev.mysql.com/doc/refman/5.0/...rmissions.html I've created the password file in the root directory, and have found the file I believe to be the correct .pid What am I doing wrong? Can someone pleeease guide me through this? |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
I"m guessing somewhat - but I think the console is trying to use sh. Like bash, and ksh, sh is a shell - that means it should be an executable named "sh" that lives in /usr/bin On some linux systems sh is a link (a kind of file that points to another file) When you are at the command line in unix, post the output of these commands: Code:
which sh echo $PATH ls -l /usr/bin/sh |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
All of the commands I entered were preceded by:
thomas-computer:~ root# which sh yielded /bin/sh echo $PATH yielded /bin:/sbin:/usr/bin:/usr/sbin and ls -l /usr/bin/sh yielded ls: /usr/bin/sh: No such file or directory |
|
#4
|
|||
|
|||
|
Then for some reason your PATH is not finding the mysqld_safe part of the command. try Code:
./mysqld_safe --init-file=~/mysql-init & Note the dot - slash at the start of the command. |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
This is killing me. I've been trying different methods for three days now, and still no luck. Part of the problem may be that the previous command has never been successful either:
shell> kill `cat /mysql-data-directory/host_name.pid` because this hasn't worked (you can see it in the link from my original post) I've shut off the server using my preferences pane in OSX. In any case, shell> ./mysqld_safe --init-file=~/mysql-init & hasn't worked for me, unfortunately. I get the same old "-sh: shell: command not found" error. |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
thomas-computer:~ root# -sh: shell: command not found
My interpretation is that sh could not find some program called "shell". |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Can someone please guide me through the last few steps once more? I'm pretty sure I know the .pid file location, and I've created the text file the solution calls for. I simply can't get the final two steps to work... Can a Unix Guru please guide me through these final two steps? I'm running Mac OS 10.4 with the latest stable MySQL.
|
| Sponsored Links | ||
|
![]() |
| Tags |
| linux, linux commands |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with shell script: cp command not working, but mv command works... | udelalv | Shell Programming and Scripting | 1 | 04-12-2011 04:34 AM |
| can anyone help with shell script command about searching word with grep command? | aintour | Shell Programming and Scripting | 2 | 10-14-2009 04:51 PM |
| Need to Write Shell Script based off of this shell command | Rally_Point | Shell Programming and Scripting | 3 | 06-10-2009 05:19 PM |
| How to use more than one MPE command STREAM with Unix command in a single shell? | bosskr | HP-UX | 1 | 10-16-2006 04:16 PM |
| How to use more than one MPE command STREAM with Unix command in a single shell? | bosskr | Shell Programming and Scripting | 0 | 09-19-2006 09:44 PM |
|
|