Back to Nocobase

How to Enable the Federated Engine in MySQL

docs/docs/en/data-sources/collection-fdw/enable-federated.md

2.1.2810 B
Original Source

How to Enable the Federated Engine in MySQL

The MySQL database does not enable the federated module by default. You need to modify the my.cnf configuration. If you are using the Docker version, you can handle the extension situation through volumes:

yml
mysql:
  image: mysql:8.1.0
  volumes:
    - ./storage/mysql-conf:/etc/mysql/conf.d
  environment:
    MYSQL_DATABASE: nocobase
    MYSQL_USER: nocobase
    MYSQL_PASSWORD: nocobase
    MYSQL_ROOT_PASSWORD: nocobase
  restart: always
  networks:
    - nocobase

Create a new ./storage/mysql-conf/federated.cnf file

ini
[mysqld]
federated

Restart MySQL

bash
docker compose up -d mysql

Check if federated is activated

sql
show engines