2

Well honestly the title says it all. I am new to server install and stuff and basically want this for testing purposes for a web app I am building. I have ubuntu up and running but want to get mysql running with the federated storage engine enabled by default. Any help is greatly appreciated.

Aron

2 Answers 2

2

federated engine seems to be disabled by default, at least in ubuntu 10.10. you can enable it by adding

[mysqld]
...
federated
...

in my.cnf

i'm on ubuntu 10.10, default mysql install.

mysql> create table local3(a integer, b integer) ENGINE=FEDERATED CONNECTION='mysql://root@localhost:3306/t1/remote';
Query OK, 0 rows affected (0.08 sec)
mysql> show warnings;
Empty set (0.00 sec)

mysql> select * from local3;
+------+------+
| a    | b    |
+------+------+
|    1 |    2 |
+------+------+
1 row in set (0.05 sec)

you may also want to check for "skip-federated" parameter in your config file(s) and eventually remove it if you want federated. few quick notes,

  • mysqld --print-defaults will give you a hint as of what args is mysqld started with after parsing the config file(s)
  • mysqld --verbose --help will not mention the "federated" parameter.
  • creating a table with federated engine when federated is disabled will just 2 warnings and no errors. the table will be created with the default engine.
1

I know this is probably too late for the OP but I have spent hours searching for how to enable the federated engine on a yum mysql build so I thought I should put the answer here for future googlers:

Distro is Fedora 14, MySQL is a standard yum mysql-server (& mysql-devel, not sure if that is relevant for this federated engine install tho') install v5.1.55.

To enable the federated engine:

Check the file 'ha_federated.so' exists. In the distro I am using it is in '/usr/lib/mysql/plugin', if it does not exist anywhere then this fix is not for you.

Start your mysql shell with a user with insert access to the mysql.plugin table.

Enter "install plugin federated soname 'ha_federated.so';" (without the double quotes)

The message "Query OK, 1 warning", should display. "show warnings" should show a warning "1123 ...plugin is disabled", this is expected.

To check if the plugin has been installed run "select * from mysql.plugin"

Exit the MySQL shell.

Edit "my.cnf" (generally found in /etc) and insert (or uncomment) the line that contains the single word "federated"

Stop & restart the mysqld service.

Fire up the shell and create a table using the federated engine, if the above has worked then "show create table newtablename" should show that the engine is using the federated engine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .