This tutorial will show how to connect the SingleStore cluster from Mac/Linux Terminal.

SingleStore: Connecting from Terminal

SingleStore provide multiple way to connect the SingleStore cluster. This tutorial will show how to connect the cluster from Mac/Linux Terminal.

Following information is required to connect to the SingleStore cluster.
Mysql connector: Mysql connector can be downloaded from this mysql website, https://dev.mysql.com/downloads/connector/odbc/

Cluster Detail: Username, Password and hostname can be store in a logon file for conveniently connecting to the SingleStore cluster. Click here to download sample Logon file.

********************logonFile.properties********************
[mysql]
user=tutorial_db_owner
password="5eFV!Q4AYy,Ynl$#_b^"
host=memsql-host-name.dbmstutrials.com
*************************************************************
Note: Double quote in the password is not part of password and enclosing it within double quote is important, otherwise it will fail with below error.

ERROR 1045 (28000): Access denied for user 'tutorial_db_owner'@'localhost' (using password: YES)


Connecting to SingleStore: Once mysql connector is installed, locate mysql file on your system under "/usr/local/mysql-8.0.25-macos11-x86_64/bin" (mysql connector version may be different). If you set the path inside .profile file for mysql then it is not required to specify full path for mysql file/program.

path/to/mysql-connector/bin/mysql --defaults-file=/path/to/logonfile/logonFile.properties  tutorial_db --port=3306 --default-auth=mysql_native_password --protocol=TCP