MySQLdb._exceptions.OperationalError: (2012, 'Error in server handshake')

Unable to connect to memsql via python

my code:
from memsql.common import database

db = database.Connection(host=“”, port = 3306 ,user=“root”, password=“root”)

MySQLdb._exceptions.OperationalError: (2012, ‘Error in server handshake’)

memsql version:
memsql-client Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper

mysql version:
mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))

MySql changed the default authentication protocol in MySQL 8, so I would suggest using the older (pre-8.0) client if possible. If you want to use the MySQL 8 client then you need to pass along default-auth=mysql_native_password in some fashion (which switches it to use the older auth method by default).

The same issue exists using the MySQL 8 client and connecting to an older version of MySQL (see i.e., MySQL also broke themselves here as well.

Thanks adam for useful info.
But I tried a different solution.

First install mysql properly on port 3306
and when creating memsql cluster start from port 3307.

host:3307 (master)
host:3308 (child aggregator)
host:3308 (leaf)