Home >Database >Mysql Tutorial >How to Enable the Federated Engine in MySQL After Installation?

How to Enable the Federated Engine in MySQL After Installation?

Barbara Streisand
Barbara StreisandOriginal
2024-10-30 04:14:02844browse

How to Enable the Federated Engine in MySQL After Installation?

Enabling the Federated Engine in MySQL After Installation

MySQL's federated engine is disabled by default, preventing users from accessing external databases through MySQL. This guide will demonstrate how to enable the federated engine after installation.

Consider the following scenario:

A MySQL 5.1.44 installation displays the following output upon querying available engines:
mysql> show engines;
+------------+---------+
| Engine     | Support |
+------------+---------+
| ndbcluster | NO      |
| MRG_MYISAM | YES     |
| BLACKHOLE  | YES     |
| CSV        | YES     |
| MEMORY     | YES     |
| FEDERATED  | NO      |
| ARCHIVE    | YES     |
| InnoDB     | YES     |
| MyISAM     | DEFAULT |

Solution:

To enable the federated engine:

  1. Edit the /etc/my.cnf configuration file.
  2. Locate the [mysqld] section and add the following line:
federated

This line explicitly enables the federated engine.

  1. Alternatively, the same effect can be achieved by specifying the --federated argument on the MySQL command line.

The above is the detailed content of How to Enable the Federated Engine in MySQL After Installation?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn