|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
MySQL on MacOS X ServerCompiled (no pun intended) by Mark J. Hershenson So you're one of those "It's all about me" people who thinks you have every right to run a nice SQL server on your MacOS X Server box. Or maybe you're one of those "I bought MacOS X Server because I wanted to use it for real work." While we at the Xclave have absolutely no love for such greedy people, for everyone else, we have decided to help you out. :) But seriously, thanks to some very nice work done by Anjo Krank, MySQL works on MacOS X Server, which is a true boon for those of you who use MySQL, or would like to attach a SQL database to PHP or any other project you may be using. Now, you have two ways to go about doing this:
On the one hand, you have the ability to go and download source code and compile it on your own machine. This is doable, for sure, but it does require some hand-tuning of the source code. What to do:
No, no, this isn't our work. This is the kind work of Anjo. Check out Anjo's site on getting MySQL working. You should probably download the source files to /usr/local/src. If you should choose to go this route, keep some things in mind from my personal experience:
The other option, of course, is to just download an already compiled binary version of MySQL. Installation is much easier. Our precompiled version of MySQL for MacOS X Server will be available from our servers from http://xclave.green-ant.com/MySQL/MySQL-MXS.tar.gz. Unless I'm mistaken, you should be able to decompress this and install it in /usr/local/mysql (this is hardcoded, I believe) and just use it. You should delete the databases in the var directory, however, and then run the mysql_install_db script in the bin directory. You will also notice that there is no benchmark suite included in the download package. I haven't been able to make it work, because I keep getting the error: Can't locate DBI.pm in @INC (@INC contains: /System/Library/Perl/rhapsody /System/Library/Perl /Local/Library/Perl/rhapsody /Local/Library/Perl /Network/Library/Perl/rhapsody /Network/Library/Perl .) at /usr/local/mysql/sql-bench/run-all-tests line 20. So I just left it off. Saves space anyway. Just download the MySQL package, and install it in /usr/local/mysql:
You should now have the following directory structure: total 14 Thanks to a mistake, part of what makes MySQL tick isn't in the MySQL package above. You will also have to download the Pthread dynamic library which MySQL requires to run. To do this...
You should now have two files: (view taken from tar ftv MySQL-MXS-pthread.tar.gz, and is not the literal view you would get from ls /usr/lib) -rwxr--r-- root/wheel 27012 1999-07-25 01:41
libpthread.A.dylib As you can see, libpthread.dylib is a link to libpthread.A.dylib. If you have trouble, try making a new link between the two. If all goes well, run /usr/local/mysql/libexec/mysqld and SQL away. If you would like MySQL to start up automatically when you startup the server, copy and paste the following into a text file and save it as 2700_MySQL in the /etc/startup/ folder: #!/bin/sh Then in Terminal, "chmod a+x /etc/startup/2700_MySQL". This allows the server to load and use the file at startup. If you have problems, e-mail us with the subject SQL problems at markhers@green-ant.com. |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
All content - ©1998-2010 - Mark J. Hershenson |
|
|
||
|
|
|
|
|
The MacOS Xclave is hosted by green-ant.com.