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.
-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
3:03 am
Please note that Richard isn’t using mysql-5.1.xx-osx10.5-powerpc.tar.gz for recompilation. He’s using mysql-5.1.37.tar.gz, which is in the Source download section at the bottom of MySQL’s download page (http://dev.mysql.com/downloads/mysql/5.1.html)
5:24 pm
checking for gawk… no
checking for mawk… no
checking for nawk… no
checking for awk… awk
checking whether make sets $(MAKE)… no
checking “character sets”… default: latin1, collation: latin1_swedish_ci; compiled in: latin1 latin1 utf8
checking whether to compile national Unicode collations… yes
checking for doxygen… no
checking for pdflatex… no
checking for makeindex… no
checking whether build environment is sane… yes
checking whether make sets $(MAKE)… (cached) no
checking for gawk… (cached) awk
checking for gcc… no
checking for cc… no
checking for cl.exe… no
If you get this error of no compilers found. Go to connect.apple.com and login via your itunes account or create your adc account. Then go to developer tools and find Xcode 3 and download and install it. It contains gcc for compiling your mysql source code.
8:11 pm
Chuck, XCode is also available on you installation DVD, so there is no real need to get the +/- 1 Gb download from the apple site.
7:31 pm
Richard,
following this tutorial I am using the Mac Os x 10.5 32 bit, Intel Based. The syntax in this page starts with ./Configure
but for an intel based Mac the source tar file doesn’t have a ./Configure file. It does have an Install-binary file. What syntax could be used on Intel based macs to create the shared libraries created above for the powerpc macs??
Thank you in advanced
7:35 pm
@Rodrigo, I think you’ve got the wrong download file, if you go to the mysql download page it is the one almost at the bottom of the page called mysql-5.1.40.tar.gz
9:51 am
Will this work for 10.5 via PPC install? I have a iMac G5, an eMac(G4) 1.0 Ghz, and a PowerMac G4 867mhz I plan to use with Leopard for a DIY server. I can’t afford anything new right now.
Dante’
1:29 pm
@Dante, yes it does. If you are using for small scale database it will work perfectly.
5:29 pm
Richard, I’ve installed 5.1.40 as a package following your instructions, all works a charm. However when I compile 5.1.43 from source all seems to go smoothly but when I start mysql from the command line it still states that it is version 5.1.40. Am I doing something wrong or is this normal? Thanks for the great website.
John
7:22 pm
@John, I’ve been told by someone else the same thing yesterday. I’m currently investigating the issue. It looks like mysqld isn’t properly copied into the bin dir…
8:48 pm
@John, solved it: please read http://diymacserver.com/2010/03/04/possible-version-problem-with-mysqld/ for the solution and explanation.