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.0.x (please not use 5.1.x yet), it’s the tar file called mysql-5.0.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.
-localstatedir=/usr/local/mysql/data \
-libexecdir=/usr/local/mysql/bin \
-libdir=/usr/local/mysql/lib \
-with-server-suffix=-standard \
-enable-thread-safe-client \
-enable-local-infile \
-enable-shared \
-with-zlib-dir=bundled \
-with-big-tables \
-with-readline \
-with-archive-storage-engine \
-with-innodb \
-without-docs \
-without-bench
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



11:17 pm
Sorry, I know I’m new to all this but what is the source directory?
I’d assumed it was the unpacked tar folder sitting on my desktop so I went: $ cd /Users//Desktop/mysql
I then ran all the commands above but I think MySQL was installed into the folder on the desktop? I also got: “NOTE: This is a MySQL binary distribution. It’s ready to run, you don’t need to configure it!’ before I could run the “make” command.
Then it installed but failed with:
:mysql $ chown: /Users//Desktop/mysql/data/.local.err: Operation not permitted
Starting mysqld daemon with databases from /Users//Desktop/mysql/data
rm: /tmp/mysql.sock: Permission denied
STOPPING server from pid file /Users//Desktop/mysql/data/.local.pid
090330 11:06:18 mysqld ended
Any help would be much appreciated.
7:08 am
Ben, you’ve downloaded the wrong package file. Get the source file almost at the bottom of the download page from the section “Source downloads”.
8:30 am
Thanks Richard – have I stuffed up my install?
8:45 am
Can’t tell but if you want a clean install, remove everything from /usr/local/mysql and from your Desktop. Reboot and start from the first page (installing the binary)