expiration_time_in_seconds
(for \\*Log
engine tables only). Due to the long interval to access this kind of table, it is optimized to store a large number of \\*Log
engine tables.CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster]ENGINE = MySQL('host:port', ['database' | database], 'user', 'password')
Parameter | Description |
host:port | Connected MySQL address |
database | Connected MySQL database |
user | Connected MySQL user |
password | Connected MySQL user password |
mysql> USE test;Database changedmysql> CREATE TABLE `mysql_table` (-> `int_id` INT NOT NULL AUTO_INCREMENT,-> `float` FLOAT NOT NULL,-> PRIMARY KEY (`int_id`));Query OK, 0 rows affected (0,09 sec)mysql> insert into mysql_table (`int_id`, `float`) VALUES (1,2);Query OK, 1 row affected (0,00 sec)mysql> select * from mysql_table;+--------+-------+| int_id | value |+--------+-------+| 1 | 2 |+--------+-------+1 row in set (0,00 sec)
CREATE DATABASE mysql_db ENGINE = MySQL('localhost:3306', 'test', 'my_user', 'user_password')SHOW DATABASES┌─name─────┐│ default ││ mysql_db ││ system │└──────────┘SHOW TABLES FROM mysql_db┌─name─────────┐│ mysql_table │└──────────────┘SELECT * FROM mysql_db.mysql_table┌─int_id─┬─value─┐│ 1 │ 2 │└────────┴───────┘INSERT INTO mysql_db.mysql_table VALUES (3,4)SELECT * FROM mysql_db.mysql_table┌─int_id─┬─value─┐│ 1 │ 2 ││ 3 │ 4 │└────────┴───────┘
Was this page helpful?