Skip to main content

Use mysql to Connect to StoneDB

This topic describes how to use the MySQL command-line client named mysql to connect to StoneDB.


MySQL Client(mysql) has been installed and its version is 5.5, 5.6, or 5.7.


Specify required parameters according to the following format.

/stonedb/install/bin/mysql -uroot -p -S /stonedb/install/tmp/mysql.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.36-StoneDB-log build-

Copyright (c) 2000, 2022 StoneAtom Group Holding Limited
No entry for terminal type "xterm";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


Parameter description

The following table describes required parameters.

-hThe IP address of StoneDB.
-uThe username of the account.
-pThe password of the account. You can skip this parameter for security purposes and enter the password as prompted later.
-PThe port used to connect to StoneDB. By default, the port 3306 is used. You can specify another port as needed.
-AThe name of the database.
-SThe name of the .sock file that is used to connect to StoneDB.
  • If you want to exit the command-line client, enter exit and press Enter.
  • For more information about parameters, run mysql --help.