How to Use clickhouse-client to Connect to TiFlash for Debugging

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 怎么用clickhouse-client连接TiFlash进行调试

| username: YvetteCh

In this article, it is mentioned that:

The DeltaTree engine of TiFlash implements the standard storage engine interface IStorage of Clickhouse data tables, allowing direct access through Clickhouse SQL. This enables simple read and write operations on the table data without introducing TiDB and TiKV, providing great convenience for integration testing and debugging. The standard read and write operations on the Clickhouse storage engine are implemented through BlockInputStream and BlockOutputStream, corresponding to writing and reading respectively, and DeltaTree is no exception. The basic unit of writing and reading is Block (please refer to Block.h). Block organizes data by columns, and these columns together constitute several rows of data.

So does this mean that TiFlash can be directly connected and data inserted through clickhouse-client?

If so, how can we check the open ports of TiFlash, and what are the account and password related to, and how to log in?

| username: ShawnYan | Original post link

@YvetteCh Welcome back.

For logging in, you can try this method: tiup tiflash client --host 127.0.0.1

TiFlash cannot directly write data yet, and TiFlash is already a fork of ClickHouse. It is recommended to write data through the TiDB server.

| username: YvetteCh | Original post link

Thank you for your response!
So, as mentioned in the blog, the access allowed directly through Clickhouse SQL, does it mean that only some ClickHouse SQL statements can be executed?

| username: dba远航 | Original post link

tiup tiflash client --host [host]; TiFlash does not support direct data writing.

| username: ShawnYan | Original post link

My understanding is like this, you can do an experiment to see.