1.clickhouse-client
1.1语法
bash
$ clickhouse-client --help
$ clickhouse-client --help
1.2常用命令
1.登录
- 带密码
bash
$ clickhouse-client -m -h localhost --user username --password 123
$ clickhouse-client -m -h localhost --user username --password 123
-m
选项表示启用 多语句模式(Multi-statement mode)
bash
$ clickhouse-client -m --query "SELECT * FROM table1; SELECT * FROM table2;"
$ clickhouse-client -m --query "SELECT * FROM table1; SELECT * FROM table2;"
- 不带密码
默认用default用户 登录
bash
$ clickhouse-client -m
$ clickhouse-client -m