0
votes

The MYSQL command line client that is installed on the ClickHouse CENTOS server works fine. My windows driver accessing CH from a remote Windows server can connect (when using the ODBC administrator)but does not work when using the connector from an application. I also tested a MYSQL driver from a remote linux application, it would not work either. I have tried a few MYSQL drivers from version 5-8 and from Oracle and MariaDB. I am getting errors from the MYSQL driver, I cannot resolve

One of the errors:

Details: "ODBC: ERROR [HY000] [MySQL][ODBC 8.0(w) Driver][mysqld-20.4.2.9-ClickHouse]Syntax error: failed at position 5: @@sql_select_limit=DEFAULT. Expected one of: ROLE, identifier, ROLE DEFAULT, DEFAULT ROLE"

A second error (different client):

could not load system variables
Syntax error: failed at position 6: VARIABLES WHERE Variable_name in ('max_allowed_packet','system_time_zone','time_zone','auto_increment_increment'). Expected one of: TABLES, GRANTS, CREATE, QUOTA USAGE, POLICIES, ROW POLICIES, PROCESSLIST, CREATE, QUOTAS, DICTIONARIES

It is important that I get the MYSQL interface working. Any ideas?

1
CH Mysql protocol does not implement all variables. You should open an issue github.com/ClickHouse/ClickHouse - Denny Crane

1 Answers

0
votes

You try to use MySQL ODBC driver to connect to Clickhouse via ODBC via MySQL wire protocol Clickhouse implements only the wired MySQL protocol but does not implement the entire SQL dialect of MySQL.

It looks like ODBC drivers that you try to use make additional SQL queries after successfully connecting to MySQL,

Can you change the Connector from ODBC to the native MySQL protocol? What language do you use?