MacPorts, Mavericks & MySQL 5.6 with Memcached

If you’ve upgraded to Mavericks you’ve probably realized that MacPorts MySQL 5.6 would not build due to some issues with MySQL itself.

That issue has now been fixed with MySQL version 5.6.15 and this changeset which is now live in the port index. Simply install like usual:

sudo port install mysql56-server

One thing the portfile doesn’t contain is the flag to enable the new 5.6 InnoDB Memcached Plugin. If you’d like to enable it, you’ll need to create a local portfile with the following changes:

# change
name                mysql56
# to
name                mysql56-custom


# change
-DWITH_SSL:STRING=bundled
# to
-DWITH_SSL:STRING=bundled \
-DWITH_INNODB_MEMCACHED=ON

If you’ve never worked with local portfiles before, here’s a quick tutorial…

# the following assumes a typical MacPorts install to /opt/local
# create a directory to hold local ports
sudo mkdir /opt/custom
# edit /opt/local/etc/macports/sources.conf and add the following line before rsync://rsync.macports.org/release/tarballs/ports.tar
# file:///opt/custom
# create the directories to hold the port file
sudo mkdir -p /opt/custom/databases/mysql56/files/
# grab the original portfile and save it to /opt/custom/databases/mysql56/Portfile
# https://trac.macports.org/browser/trunk/dports/databases/mysql56/Portfile
# also grab the 5 supporting files and save them in /opt/custom/databases/mysql56/files/
# https://trac.macports.org/browser/trunk/dports/databases/mysql56/files
# update the Portfile with the following changes:
# Line 6:
# OLD: name mysql56
# NEW: name mysql56-custom
# Line 97:
# OLD: -DWITH_SSL:STRING=bundled
# NEW: -DWITH_SSL:STRING=bundled \
# -DWITH_INNODB_MEMCACHED=ON
# index the new port
cd /opt/custom
sudo portindex
# verify the port was added
port search mysql56-custom
# you should see:
# mysql56-custom @5.6.15 (databases)
# mysql56-custom-server @5.6.15
# install
sudo port install mysql56-custom-server

view raw
localport.sh
hosted with ❤ by GitHub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s