0

Is there any way to pass the user password manually without passing the password in the sqlline jdbc connection string (like below). We want that sqlline tool will ask to put the password to connect, how to achieve this.

./sqlline.sh --verbose=true -u "jdbc:ignite:thin://127.0.0.1:10800;user=ignite;password=ignite"

alamar
  • 18,729
  • 4
  • 64
  • 97

1 Answers1

1

Sqlline will always ask for user and password if they are not provided on connection string.

alamar
  • 18,729
  • 4
  • 64
  • 97
  • I tried but without username and password its failed. Can you please share the exact command to do so? – sandipbhowmik Jun 19 '20 at 15:51
  • Just run `sqlline.sh` and then issue `!connect` – alamar Jun 19 '20 at 16:37
  • how to pass the driver (jdbc:ignite:thin://127.0.0.1:10800), schema and ssl options after passing !connect `sqlline> !connect` `Usage: connect [driver]` – sandipbhowmik Jun 21 '20 at 15:52
  • `!connect jdbc:ignite:thin://127.0.0.1:10800;user=ignite;password=ignite` – alamar Jun 21 '20 at 17:19
  • I don't want to put the password in the connection string and tried in this way, however it's still failing. `sqlline> !connect jdbc:ignite:thin://node1:10800,node2:10800,node3:10800/CURATED;sslMode=require Enter username for jdbc:ignite:thin://node1:10800,node2:10800,node:10800/CURATED;sslMode=require: igntest Enter password for jdbc:ignite:thin://node1:10800,node2:10800,node3:10800:10800/CURATED;sslMode=require: ******** Error: Failed to connect to Ignite cluster [url=jdbc:ignite:thin://node1:10800,node2:10800,node3:10800/CURATED;sslMode=require] (state=08001,code=0)` – sandipbhowmik Jun 22 '20 at 05:25
  • I'm giving correct credentials only as its running fine if I use a single command like this: Connected to: Apache Ignite (version 2.7.6) Driver: Apache Ignite Thin JDBC Driver (version 2.7.6) Autocommit status: true Transaction isolation: TRANSACTION_REPEATABLE_READ sqlline version 1.3.0 0: jdbc:ignite:thin://node1>` – sandipbhowmik Jun 22 '20 at 11:48
  • Maybe sslMode is the culprit? Usually it recommends specifying key and trust stores. – alamar Jun 22 '20 at 13:21
  • As I already said everything is running fine when I run the command as a single command with username, password, ssl and I'm able to connect. As the `!connect` command suggests, what would be the value for the below: `url` `driver` – sandipbhowmik Jun 22 '20 at 18:57
  • Url is `jdbc:ignite:thin://host:port?key=val&key=val...`. Driver is not needed. `!connect` always works for me, for years already. – alamar Jun 23 '20 at 08:24