Problem replicating MySQL database to ClickHouse

74 Views Asked by At

I am trying to replicate a MySQL database to ClickHouse following these steps

I could do all configuration at MySQL and ClickHouse without any errors. But when I try to test the integration, following error pops up.


25ad86885814 :) select * from table_1

SELECT *
FROM table_1

Query id: b0263b0d-84f6-4b52-85d7-f9eb0088e664


Elapsed: 0.001 sec.

Received exception from server (version 23.12.2):
Code: 100. DB::Exception: Received from localhost:9000. DB::Exception: Access denied for user clickhouse_user. (UNKNOWN_PACKET_FROM_SERVER)

Following error observed in /var/log/clickhouse-server/clickhouse-server.err.log

2024.01.23 14:41:11.913405 [ 48 ] {b0263b0d-84f6-4b52-85d7-f9eb0088e664} <Error> TCPHandler: Code: 100. DB::Exception: Access denied for user clickhouse_user. (UNKNOWN_PACKET_FROM_SERVER), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c6d5d7b in /usr/bin/clickhouse
1. DB::Exception::Exception<String&>(int, FormatStringHelperImpl<std::type_identity<String&>::type>, String&) @ 0x000000000718558d in /usr/bin/clickhouse
2. DB::MySQLClient::connect() @ 0x0000000011106352 in /usr/bin/clickhouse
3. DB::MaterializedMySQLSyncThread::synchronization() @ 0x00000000111462b3 in /usr/bin/clickhouse
4. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000011152c11 in /usr/bin/clickhouse
5. void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x000000000c7c00d8 in /usr/bin/clickhouse
6. ? @ 0x00007ff82a01e609 in ?
7. ? @ 0x00007ff829f43353 in ?

No errors observed at MySQL, except for these warnings when materialized table is setup at ClickHouse.

mysql-1       | 2024-01-23T14:38:52.710558Z 14 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Version details

//MySQL

bash-4.4# mysql -V
mysql  Ver 8.0.36 for Linux on x86_64 (MySQL Community Server - GPL)


//ClickHouse

SELECT version()

Query id: b4296784-66ac-4353-af4b-1c05360bbe7b

┌─version()──┐
│ 23.12.2.59 │
└────────────┘

What should I be checking?

0

There are 0 best solutions below