MySQL

    The MySQL database engine translate queries to the MySQL server so you can perform operations such as SHOW TABLES or SHOW CREATE TABLE.

    You cannot perform the following queries:

    • RENAME
    • CREATE TABLE
    • ALTER

    Engine Parameters

    • host:port — MySQL server address.
    • database — Remote database name.
    • user — MySQL user.
    • password — User password.

    Nullable is supported.

    For better compatibility you may address global variables in MySQL style, as @@identifier.

    These variables are supported:
    - version
    - max_allowed_packet

    By now these variables are stubs and don’t correspond to anything.

    Example:

    1. SELECT @@version;

    Table in MySQL:

    1. Database changed
    2. mysql> CREATE TABLE `mysql_table` (
    3. -> `int_id` INT NOT NULL AUTO_INCREMENT,
    4. -> `float` FLOAT NOT NULL,
    5. -> PRIMARY KEY (`int_id`));
    6. Query OK, 0 rows affected (0,09 sec)
    7. mysql> insert into mysql_table (`int_id`, `float`) VALUES (1,2);
    8. Query OK, 1 row affected (0,00 sec)
    9. mysql> select * from mysql_table;
    10. +------+-----+
    11. | int_id | value |
    12. +------+-----+
    13. 1 row in set (0,00 sec)
    1. CREATE DATABASE mysql_db ENGINE = MySQL('localhost:3306', 'test', 'my_user', 'user_password')
    1. ┌─name─────┐
    2. default
    3. mysql_db
    4. system
    5. └──────────┘
    1. SHOW TABLES FROM mysql_db
    1. ┌─name─────────┐
    2. mysql_table
    3. └──────────────┘
    1. ┌─int_id─┬─value─┐
    2. 1 2
    3. └────────┴───────┘
      1. SELECT * FROM mysql_db.mysql_table