MySQL chain tables may be unfamiliar to many new users who are new to MySQL databases. MySQL chain tables are only supported by MySQL 5.0.3 or above, and there are still some restrictions.
The remote server can only be MySQL and does not support distributed transactions.
Use show create table or show table status to view the link string.
Specific Method:
Add a federated row under [mysqld] In My. ini, and restart the mysql service to enable the chain table engine.
Create a table:
- CREATE TABLE federated_table (
- id int(20) NOT NULL auto_increment,
- name varchar(32) NOT NULL default '',
- other int(20) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY name (name),
- KEY other_key (other)
- )
- ENGINE=FEDERATED
- DEFAULT CHARSET=utf-8
- CONNECTION='mysql://root@remote_host:9306/federated/test_table';
-
Connection can be in the following formats:
- CONNECTION='mysql://username:password@hostname:port/database/tablename'
- CONNECTION='mysql://username@hostname/database/tablename'
- CONNECTION='mysql://username:password@hostname/database/tablename'
-
Combination of multiple MySQL table result sets
Implementation of MySQL table sharding
MySQL authorization table usage example
Disadvantages of MySQL memory tables
Deletes the MySQL registry information.