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.)
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.
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.
Should be a folder at /Library/StartupItems/MySQLCOM
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