Richard
Note: These instructions presume you first installed MySQL via the binary installation package and then compile the source code to get proper shared libraries.
You need to download the source to MySQL 5.1.x, select “Source Code” from the platform selector and the download the “Generic Linux (Architecture Independent)” tar file. It’s usually called mysql-5.1.xx.tar.gz (xx is version number). Unpack it and open a Terminal session where you cd into the source directory and execute the following commands.
CXXFLAGS="-arch x86_64" \
./configure -prefix=/usr/local/mysql \
-with-server-suffix=-standard \
-enable-thread-safe-client \
-enable-local-infile \
-enable-shared \
-with-zlib-dir=bundled \
-with-big-tables \
-with-readline \
-with-plugins=all \
-without-docs
If that went without errors you are ready to compile:
And if that went also without errors you are ready to install:
And now you’ve got a proper MySQL installation with shared libraries. Which means you can compile and install all kinds of software that requires access to MySQL databases.
Next step: Securing your MySQL install



Comments
10:57 pm
Xcode need to be installed before to compile.
5:49 pm
This step is different in mysql 5.5.8. Would be great to have a step by step manual…
Thanks a lot for all the manuals!
8:09 am
@Urs, you are right and I’m updating the instructions but they are not ready yet. You can find the differences between 5.1.x and 5.5.x for everything in my earlier blogpost at http://diymacserver.com/2011/01/08/first-attempt-at-using-mysql-5-5-x/
The good news, you don’t need to compile MySQL anymore.
3:08 pm
I’m trying to run this step but getting: ./configure: No such file or directory
I see in the directory there is a configure.cmake and not a configure file. Do I need to do something different? It is version 5.6.2
6:55 pm
@Brad, please make sure you’ve downloaded the correct file. You need to download the actual source code. Select “source code” from the drop down list and then select the “Generic Linux (Architecture Independent), Compressed TAR Archive”
6:58 pm
Brad, Sorry I read too quickly. Version 5.6.x is not a GA release it is still a beta release. These compilation instruction work only for the 5.1.x release. The 5.5.x release does not require compilation anymore read more about it here: http://diymacserver.com/2011/01/08/first-attempt-at-using-mysql-5-5-x/