mysql 开启 federated
时间: 2023-07-03 15:29:27 浏览: 107
To enable the FEDERATED storage engine in MySQL, you need to make sure that it is installed and enabled in your MySQL server. The FEDERATED storage engine is included in most MySQL distributions, but it may not be enabled by default.
To check if FEDERATED is installed and enabled, you can run the following command in your MySQL server:
```
SHOW ENGINES;
```
This will display a list of all the storage engines that are installed and enabled in your MySQL server. Look for the FEDERATED engine in the list. If it is not listed, you may need to install it or enable it in your MySQL configuration.
To enable the FEDERATED engine in MySQL, you can add the following line to your MySQL configuration file (usually my.cnf or my.ini):
```
federated
```
Then, restart your MySQL server for the changes to take effect.
Once FEDERATED is enabled, you can create FEDERATED tables in your MySQL server using the syntax I mentioned in my previous answer.
阅读全文