sharp bites

standing on the shoulders of giants

Enabling Mysql's Federated engine/plugin on Mac OS X

I spent a few hours trying to get the federated engine to work on Mysql, and since I didn’t find any good sources for it, I thought a blog might help someone else.

First, install mysql if you haven’t already. I used homebrew.

1
$ brew install mysql

The Federated plugin is not installed by default, so you’ll have to do it manually. Get into mysql as root (or a user that can alter the mysql.plugin table) and type:

1
mysql> install plugin federated soname 'ha_federated.so';

To check if it was installed correctly run:

1
mysql> show plugins;

Exit the shell and edit /etc/my.cnf file. If you don’t have any, you’ll find an example in your mysql installation directory.

1
$ sudo cp $(brew --prefix mysql)/support-files/my-small.cnf /etc/my.cnf

Edit the file, and under [mysqld] add a line that contains:

1
federated

Restart the mysqld service:

1
mysql.server restart

Congrats. You’re done!

Comments