Installing mysql:sudo launchctl: command not found


 
Thread Tools Search this Thread
Top Forums Web Development Installing mysql:sudo launchctl: command not found
# 1  
Old 02-12-2014
Installing mysql:sudo launchctl: command not found

I have run into an obstacle. See error message below **
I am Running:
'Mountain lion' , 'Mac OS X 10.8.3'
I have downloaded:
MySQL version. Mac OS X 10.7. (X86, 64-bit), DMG Archive.
After several days of reading about:
Installation of MySQL
Enabling apache server
And getting phpMyAdmin up

I found two sets of instructions: link1 and link2 about installing

apache, phpMyAdm and mySQL.

Link1.
i keep getting errors that i have 5+ urls in this message. i just deleted link1.
it is under 'apple forum discussions doc-3082'

Where this sentence lead me to believe I could use the version listed above.
There is NO version for 10.8
" Download MySQL from a local mirror. You want the Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive. At the time of writing this User Tip, the current version is 5.5.34. By the time you read this, there may be a newer version to use instead. Open the archive mysql-5.5.34-osx10.6-x86_64.dmg. "

I followed the instructions on link1, and all went well until getting this error message when I type the following command at the terminal prompt:


Code:
launchctl load -w /comdotmysql.mysql.plist

**Error message
-bash: launchctl: command not found.

1. I cd - changed directories all the way back up the file structure to type the command to see if it needed to be run someplace special but the same error came up.
2. I searched here on this forum and on the web.
3. I went back and checked over every step and everything that i typed.
4. I ended up typing the instructions below by hand
because somewhere I read that a copy/paste may insert invisible characters.

Excerpt from link1.
Code:
sudo vi /Library/LaunchDaemons/comdotmysql.mysql.plist

Use the following content:

<plist version="1.0">
  <dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>comdotmysql.mysqld</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/mysql/bin/mysqld_safe</string>
    <string>--user=mysql</string>
    </array>
  </dict>
</plist>

Can someone please explain what I am missing ?

Why is this command
****
Code:
-bash: launchctl: command not found.

That is launch c t lowercase L not number 1
****
someone suggested that i echo the path....

From the first prompt:
Code:
computerName:~<shortname$> echo "${PATH}"
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

It has been a while since I have been navigating around at a unix prompt.

That looks like the path is too long.

Can you interpret the above path for me if it is not too much trouble ?

An added note.

The following link2 also had a very nice set of instructions but unlike link1, this link uses the
'Preference pane' and 'startup item' which link1 discourages because it causes problems down the road.
I would rather use the command line and do not want to give up on this method.

The forum only allow for one url but if you search the below you will find link2 if you are interested. It seems like a good site but I do not want to mess up my system or file structure installing and configuring a bunch of things.
Link2. the coolestguidesontheplanet install-configure- apache-mysql-php-phpmyadmin



Now that I am going head strong with this project, I hope that my issue can be resolved quickly with this community
so I don't loose my momentum.
Thanks a lot.
# 2  
Old 02-12-2014
Quote:
launchctl load -w /comdotmysql.mysql.plist

**Error message
-bash: launchctl: command not found.
I would start be wondering what is it that is not found...
like
Code:
which launchctl

and if that gives nothing start to look for the damn beast using find command
# 3  
Old 02-12-2014
Hi.
1.
As you suggested I did a 'find launchctl' all the way up the tree.

Code:
MacBookPro:httpd shortname$ cd ..
MacBookPro:share shortname$ find launchctl
find: launchctl: No such file or directory
MacBookPro:share shortname$ cd ..
MacBookPro:usr shortname$ find launchctl
find: launchctl: No such file or directory
MacBookPro:usr shortnamel$ cd ..
MacBookPro:/ shortname$ find launchctl
find: launchctl: No such file or directory

2.
Then I just looked in the directories and found the below.
launchctl (is not a directory) found in bin.

Code:
MacBookPro:bin shortname$ ls
[        csh        echo        ksh        mkdir        rcp        stty        wait4path
bash        date        ed        launchctl    mv        rm        sync        zsh
cat        dd        expr        link        pax        rmdir        tcsh
chmod        df        hostname    ln        ps        sh        test
cp        domainname    kill        ls        pwd        sleep        unlink



3.
I did find this.

Code:
MacBookPro:library shortname$ cd launchdaemons

MacBookPro:launchdaemons shortname$ ls

com.adobe.SwitchBoard.plist        com.mysql.mysql.plist
com.adobe.fpsaud.plist            com.oracle.java.Helper-Tool.plist



I think but not certain that mysql needs to launch from com.mysql.mysql.plist.
I tried to run the code
Code:
launchctl load -w /comdotmysql.mysql.plistfrom the launchdaemons directory and 
same error -bash launchctl command not found

thanks for responding quickly.
i want to understand this stuff
thanks again.
# 4  
Old 02-12-2014
Pity Im at work... my Mac is at home...
I am puzzled by you answer, did you type which launchctl ?
If that produces nothing (understand - Return nothing - you can test with another command like ls to see...) then I, as a paranoid would go to root and search for it:
Code:
cd /
find / -name launctl -print

then check all occurence to see what they are...
Once found the one required, check if executable and why its not in the PATH environment variable
Would set it and see if now things og better...
# 5  
Old 02-12-2014
installing mySQL: 'launchctl not found' &now 'nothing to load'

Thanks. I know that you are helping me in between things. I appreciate that.
It is also hard to decipher these bit long responses. I am trying to get right back but it takes time to run code and copy/paste here in some sort of organized manner.

1.

I had typed
Code:
Find launchctl

as the command. See last post.



Then did what you said to do.
Code:
Macbookpro:/ shortname$  which launchctl
 /bin/launchctl

2.

I again tried the same thing. the command from bin directory.
Code:
launchctl load -w /com.mysql.mysql.plist

Same error:
-bash: launchctl: command not found.


If you look above in my previous post in the code boxes, you will see that I had already located one launchctl in the bin directory by navigating around.



I looked around
Code:
MacBookPro:library shortname$ cd launchdaemons
MacBookPro:launchdaemons shortname$ ls
com.adobe.SwitchBoard.plist        com.mysql.mysql.plist
com.adobe.fpsaud.plist            com.oracle.java.Helper-Tool.plist

and looked inside of com.mysql.mysql.plist.

Big Mistake.
When I cut and pasted the code from the setup site, I had extra code
which I deleted. It was something like
Code:
sudo vi  /Library/LaunchDaemons/com.mysql.mysql.plist.

Not really certain but I think that may have caused the
launchctl command not found

3.
i rebooted terminal and executed the command again from
top of tree
and
from bin
Getting a different error message.


Code:
MacBookPro:/ shortname$ sudo launchctl load -w /com.mysql.mysql.plist
launchctl: Couldn't stat("/com.mysql.mysql.plist"): No such file or directory
nothing found to load

MacBookPro:/ shortname$ cd bin
MacBookPro:bin shortname$ sudo launchctl load -w /com.mysql.mysql.plist
Password:
launchctl: Couldn't stat("/com.mysql.mysql.plist"): No such file or directory
nothing found to load



4.
It's the executable launchctl. yes ?
If it is not a directory.

You seem like a systems person.... Lucky you
Me heading in as root.... I am a little brave but not yet.
But as mentioned, I like to understand the system and files and look around hence not using the GUI installs.


I am serious about learning (relearning) this stuff.


At this point just want to get MySQL and phpMyAdmin up and running.
I will be at this all day.
Thanks again,

---------- Post updated at 12:40 PM ---------- Previous update was at 12:01 PM ----------

still troubleshooting this.
Code:
MacBookPro:launchdaemons shortname$ sudo launchctl load -w -F com.mysql.myswl.plist
launchctl: Couldn't stat("com.mysql.myswl.plist"): No such file or directory
nothing found to load

but it is there !
Code:
MacBookPro:launchdaemons shortnamel$ ls
com.adobe.SwitchBoard.plist        com.mysql.mysql.plist
com.adobe.fpsaud.plist            com.oracle.java.Helper-Tool.plist

the contents of com.mysql.mysql.plist

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<string>--user=mysql</string>
</array>
</dict>

is this line okay ?
<string>com.mysql.mysqld</string>

is this line of code okay ?
<string>com.mysql.mysqld</string>
it is exactly from the setup instructions.
thanks again.

Last edited by iHaveAQuestion; 02-12-2014 at 01:45 PM.. Reason: tag the code
# 6  
Old 02-12-2014
My guess, is launchctl is executable but for root only... so you will have to use sudo...Now command line : since you edited:
Code:
sudo vi  /Library/LaunchDaemons/com.mysql.mysql.plis

I believe the command then should be:
Code:
sudo launchctl load -w -F  /Library/LaunchDaemons/com.mysql.mysql.plis

But I have no idea what your optins (-w -F) are for.. I am not a Mac person...
# 7  
Old 02-12-2014
Quote:
Originally Posted by iHaveAQuestion
I had typed
Code:
Find launchctl

as the command. See last post.
Sorry for not going over the rest of your post, but i want to concentrate on this small part of your problem:

First, Unix is CASE-SENSITIVE! If someone asks you to run "find" and you type "Find" chances are you will have no success at all (if you are lucky) or run something completely different without noticing (if you are unlucky). In Unix, "Find" and "find" are two completely different things. The same goes for every other file, command, directory, ...

Second: the "find" command is used differently and the way you used it (even if you have used "find", not "Find") would not have found anything. If you do not know how to use a command use the "man"-pages. For any command "command", type

Code:
man command

and for a keyword "keyword" type

Code:
man -k keyword
apropos keyword

The two forms are alternatives. Use either one and get a list of articles like the following (from a AIX v5.3 system, your output may look slightly different):

Code:
# apropos config
adfutil(1)      - Provides the capability to merge Micro Channel information[...]
autoconf6(1)    - Automatically configures IPv6 network interfaces at boot time.
autopush(1)     - Configures lists of automatically pushed STREAMS modules.
bootptodhcp(1)  - To convert a BOOTP configuration file into a DHCPconfiguration [...]
[....]

The numbers in the brackets are chapter numbers, the names are keywords. You could now, for instance, do a

Code:
man 1 adfutil

to get information about the "adfutil"-command. I suggest you do a "man find" (you can also issue "man man" to learn how to use "man" itself) and learn how to use "find".

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error installing MySQL 8 on RHEL 7

My yum install command is failing. I first did yum clean all I even tried with localinstall. Below is the error output: yum install mysql-community-server*.rpm Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an... (8 Replies)
Discussion started by: mohtashims
8 Replies

2. Red Hat

Problem in installing mysql

Hi i am trying to install mysql rpm package on my linux machine but getting below error : warning: MySQL-embedded-5.5.28-1.rhel5.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies: MySQL-devel is needed by MySQL-embedded-5.5.28-1.rhel5.i386 ... (9 Replies)
Discussion started by: mukulverma2408
9 Replies

3. UNIX for Dummies Questions & Answers

launchctl loads app with icon (OS X)

We are deploying an app to our students that is running as a daemon. It keeps them from using certain software. The problem is that when we initially deploy it we don't want to require a restart. So we decided to use launchctl to load the daemon manually. When we do it this way, though, the... (4 Replies)
Discussion started by: nextyoyoma
4 Replies

4. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

5. BSD

Installing FreeBsd. No usb device found

Hello, all. My english is not good. I have a problem installing FreeBsd. I have not CD-Roms, so i use program FlashBoot for convert iso-image to USB Device. After, I was beginning to install FreeBsd (Sorry my english) When it's time to choose an installation media, i select 9 USB:... (3 Replies)
Discussion started by: snet
3 Replies

6. BSD

Installing MySQL package

Hey all I'm having a little trouble installing a MySQL database. This is what I tried... export PKG_PATH=ftp://mirror.planetunix.net/pub/OpenBSD/4.9/packages/`machine -a` pkg_add -v mysql-server mysql-client and this is what I get Unknown element: @rcscript /etc/rc.d/mysqld in... (1 Reply)
Discussion started by: desreguard
1 Replies

7. Solaris

Error in installing the mysql-python-1.2.3.tar.gz

Hi, I followed the step written in README. It got some error message when I type " #python setup.py build" running build running build_py copying MySQLdb/release.py -> build/lib.solaris-2.11-i86pc-2.4/MySQLdb running build_ext building '_mysql' extension /usr/lib/python2.4/pycc -DNDEBUG... (2 Replies)
Discussion started by: AlexCheung
2 Replies

8. UNIX for Dummies Questions & Answers

sh: sudo: not found

As I am trying to log in, when input my user-name (root), when the password prompt, this is what I got (highlighted in red), before i can put in my password. Please tell my why this happened. console login: root Password: sh: sudo: not found Thank you. (0 Replies)
Discussion started by: iamnew2solaris
0 Replies

9. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

10. UNIX for Dummies Questions & Answers

Sudo: command not found

I am totally newbie. I try to login UNIX Solaris 10 through ssh command as user then i use sudo command to login as root: sudo su - but system give me an error sudo: not found. How can i fix this problem and install ssh services for my unix. (1 Reply)
Discussion started by: cthinh
1 Replies
Login or Register to Ask a Question