-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Enhanced MySQL compatibility #9336
Description
Use case
The basic idea is to increase the MySQL compatibility with wire protocol in order to have tools like phpMyAdmin, DBeaver, ... working easily on ClickHouse (reading data)
Describe the solution you'd like
ClickHouse MySQL wire protocol works fine with application (eg. PHP, Perl, ...) but has problems with MySQL tools since they use "custom" SQL commands that MySQL understand while ClickHouse gives problems.
We propose to add a flag that enhance MySQL compatibility.
The solution requires two approach:
- Support more MySQL command
There are commands like "SET NAMES utf8", "SET autocommit=1", ... that have no meaning
and can simply do nothing in CH but reply OK if the flag is active - Create the "mysql" data dictionary database
This can be easly created in ClickHouse using VIEWs from SYSTEM
The goal is to reach a "read only" compatibility with MySQL.
Creating CH data structures or traslating DML language requires much more work
and is not needed.
Describe alternatives you've considered
I used a simple self-made proxy to skip MySQL custom command... and it works!
Additional context
This compatibility could enable CH+wire protocol to be used as a MySQL DB with Linked Server in SQLServer, FDW in PostgreSQL, Oracle gateway, ...
I can provide the list of commands, variables, data dictionary views I have found till now...