You have to provide the following information whenever possible.
#/usr/local/mysql/bin/mysql -h127.0.0.1 -P9004 -udefault
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 21.6.5.37-ClickHouse

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Segmentation fault (core dumped)

A clear and concise description of what works not as it is supposed to.
centos 7.5 
mysql client version : 8.0.20, 8.0.22,8.0.25 

clickhouse server verion : 21.6.4 late 



**How to reproduce**

* clickhouse server verion : 21.6.4 

mysql --version
mysql  Ver 8.0.25 for macos11 on x86_64 (MySQL Community Server - GPL)
mysql --version
mysql  Ver 8.0.23 for Linux on x86_64 (MySQL Community Server - GPL)

**Expected behavior**

A clear and concise description of what you expected to happen.

**Error message and/or stacktrace**
strace /usr/local/mysql/bin/mysql -h127.0.0.1 -P9004 -uwubx -p
munmap(0x7f5dbb4f5000, 4096) = 0
sendto(3, "\16\0\0\0\3select USER()", 18, 0, NULL, 0) = 18
recvfrom(3, "\1\0\0\1\1#\0\0\2\3def\0\0\0\rcurrentUser()\0\f"..., 16384, 0, NULL, NULL) = 131
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV +++
Segmentation fault


If applicable, add screenshots to help explain your problem.

**Additional context**

gdb ./bin/mysql ./core.18564

(gdb) bt
#0 0x00007ffff620e721 in __strlen_sse2_pminub () from /lib64/libc.so.6
#1 0x000000000043ebcc in my_strdup (key=key@entry=0, from=0x0, my_flags=my_flags@entry=16)
at /data/mysql-8.0.20/mysys/my_malloc.cc:295
#2 0x000000000040c234 in init_username () at /data/mysql-8.0.20/client/mysql.cc:5228
#3 init_username () at /data/mysql-8.0.20/client/mysql.cc:5219
#4 0x0000000000414450 in construct_prompt () at /data/mysql-8.0.20/client/mysql.cc:5131
#5 read_and_execute(bool) () at /data/mysql-8.0.20/client/mysql.cc:2216
#6 0x000000000040a357 in main () at /data/mysql-8.0.20/client/mysql.cc:1432
#7 0x00007ffff60c1555 in __libc_start_main () from /lib64/libc.so.6
#8 0x000000000040add0 in _start () at /opt/rh/devtoolset-8/root/usr/include/c++/8/new:169

//client/mysql.cc
static void init_username() {
      my_free(full_username);
      my_free(part_username);
      
      MYSQL_RES *result = nullptr;
      if (!mysql_query(&mysql, "select USER()") 
     &&  (result = mysql_use_result(&mysql))) {
            MYSQL_ROW cur = mysql_fetch_row(result);
            full_username = my_strdup(PSI_NOT_INSTRUMENTED, cur[0], MYF(MY_WME));
            part_username =
            my_strdup(PSI_NOT_INSTRUMENTED, strtok(cur[0], "@"), MYF(MY_WME));
            (void)mysql_fetch_row(result); // Read eof
      }
}

from source and gdb trace get use mysql client connect clickhouse 9004 execute **select USER()** get 0x0

maybe clickhouse mysql protocol context->getClientInfo not implementation.

#except 
please implementat clickhouse server mysql protocol context->getClientInfo

#endif
#if USE_SSL
#    include <Poco/Crypto/CipherFactory.h>
#    include <Poco/Crypto/RSAKey.h>
#    include <Poco/Net/SSLManager.h>
#    include <Poco/Net/SecureStreamSocket.h>
#endif
namespace DB
{
using namespace MySQLProtocol;
using namespace MySQLProtocol::Generic;
using namespace MySQLProtocol::ProtocolText;
using namespace MySQLProtocol::ConnectionPhase;
#if USE_SSL
using Poco::Net::SecureStreamSocket;
using Poco::Net::SSLManager;
#endif
namespace ErrorCodes
{
    extern const int CANNOT_READ_ALL_DATA;
    extern const int NOT_IMPLEMENTED;
    extern const int MYSQL_CLIENT_INSUFFICIENT_CAPABILITIES;
    extern const int SUPPORT_IS_DISABLED;
}
static const size_t PACKET_HEADER_SIZE = 4;
static const size_t SSL_REQUEST_PAYLOAD_SIZE = 32;
static String selectEmptyReplacementQuery(const String & query);
static String showTableStatusReplacementQuery(const String & query);
static String killConnectionIdReplacementQuery(const String & query);
MySQLHandler::MySQLHandler(IServer & server_, const Poco::Net::StreamSocket & socket_,