Copy full table

  1. On destination: Create the table with the same definition as on the source:
mysql> USE test;mysql> CREATE TABLE IF NOT EXISTS `event_history`(  `event_id` int(11) NOT NULL,  `event_name` varchar(10) DEFAULT NULL,  `created_at` datetime NOT NULL,  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,  `event_type` varchar(10) NOT NULL,  `msg` tinytext NOT NULL,  PRIMARY KEY (`event_id`,`created_at`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4PARTITION BY RANGE (to_days(`created_at`))(PARTITION 2017_oct_week1 VALUES LESS THAN (736974) ENGINE = InnoDB, PARTITION p20171008 VALUES LESS THAN (736975) ENGINE = InnoDB, PARTITION p20171009 VALUES LESS THAN (736976) ENGINE = InnoDB, PARTITION p20171010 VALUES LESS ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.