Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Please be doubly sure that you've investigated this on OSX Server. http://www.apple.com/server/macosx/ Which is a different beast from normal OSX.

OSX Server (not the desktop version) includes a built in copy of MySQL. This would probably be OK, but it's missing the development libraries, so you can't do things like compile/install python bindings to work with it.

On OSX desktop I just grab the MySQL binary packages from MySQL's website and python support is built in.

Has anyone found a way to prune out OSX's MySQL installation?

(The reason I need to do this is that only OSX Server can be run inside a VM, and I need to approximate an OSX desktop development environment inside a VM -- XCode, MySQL, etc.)

share|improve this question
add comment

1 Answer

REMOVAL OF MySQL on MAC OSX

Uninstalling mysql is probably one of the easiest things to uninstall - but it does seem like a daunting task if your not sure where to start.

It boils down to three places.

  1. Should be main directory folder at /usr/local/mysql (maybe with a version suffix) which contains all the subdirectories. If it contains a version suffix there will also be a soft link called mysql that points to the actuall directory folder.

  2. Should be a folder at /Library/StartupItems/MySQLCOM

  3. Should be a preference pane in /Library/PreferencePanes/ as well and that is all there is to it.

Also if a .pkg install you will have an entry in /Library/Receipts as well that you can remove.

All locations need to be deleted as root, so you will need to use sudo to do it. If you are not used to doing this, then post again after checking the above four locations to make sure that's where everything is installed. That way some one can give you the exact commands needed to delete the folders.

p.s There will also be an entry in /etc/hostconfig file MYSQLCOM=-YES- which you can change to MYSQLCOM=-NO- or delete the line. Again you will need to use sudo to do this as well.


Thanks folks - your right - but you most likely should have followed the link as well ;-)

For Mysql on Server OSx - however mysql wont be found in the normal /usr/local/mysql.

instead they follow the normal Nix location... executables in /usr/sbin and /usr/bin, man pages in /usr/share/man, and other parts in /usr/share/mysql.

When installed, the MySQL database resides in /var/mysql.

Removing this however may cause some other instabilities - depending if anything else is using it... (like the system itself)

Should you want to run a different version - You can however just install your own version of MySQL. simply make sure your shell's path variable is set to search in your local directory first or prefix the commands with the actual path your using.

This is generally how Apple suggests you upgrade as well. -

If you are running Mac OS X Server v10.5 through 10.5.4, go here

If you are running Mac OS X Server v10.5.5 or later, go here

share|improve this answer
    
You know, those of us who have been around the block a few times can spot a copy/paste job from a mile away. This was no exception. If you're unable to actually answer the question in an intelligent fashion yourself, the least you could do is give proper attribution. –  EEAA Dec 2 '10 at 5:32
    
Glenn's instructions appear to be for removing MySQL on OSX Desktop version. On OSX Server there is no /usr/local/my* Binaries are in /usr/bin. Also checking version shows "mysql Ver 14.14 Distrib 5.0.88 for apple-darinw10.0 (i386)" –  Joel K Dec 2 '10 at 5:42
    
@Joel - that's becuase he didn't put any thought into it. He did a google search for something like "osx mysql uninstall" found something that looked legit, and copy/pasted instructions here without verifying that they made any sense at all. –  EEAA Dec 2 '10 at 5:49
    
ErikA - no not quite - i actually added a link to where i pulled it from but also referenced once i realized they meant server and i tested the directions on an xserve locally that did not work ... in any event - the updated directions should help –  Glenn Kelley Dec 2 '10 at 8:33
    
Either way, part of his edit is correct: You can however just install your own version of MySQL. simply make sure your shell's path variable is set to search in your local directory first or prefix the commands with the actual path your using. –  Jack Lawrence Dec 13 '10 at 20:00
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.