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:
SELECT @@version;
Table in MySQL:
Database changed
mysql> 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 row in set (0,00 sec)
CREATE DATABASE mysql_db ENGINE = MySQL('localhost:3306', 'test', 'my_user', 'user_password')
┌─name─────┐
│ default │
│ mysql_db │
│ system │
└──────────┘
SHOW TABLES FROM mysql_db
┌─name─────────┐
│ mysql_table │
└──────────────┘
┌─int_id─┬─value─┐
│ 1 │ 2 │
└────────┴───────┘
SELECT * FROM mysql_db.mysql_table