connect

connect <database>  [--user] [--password] [--host] [--port]

Connects to the specified database. This command requires that there is no connection to a database.

Arguments

Argument

Explanation

database

database name

Options

Option

Explanation

–user, -u

user id

–password, -p

password

–host, -h

host name/ip address

–port, -P

port number

Example

tomas@tomsmbp:~/ > dboo
dboo> connect --host=localhost --port=2563 --user=root
dboo root@dboo::server>


tomas@tomsmbp:~/ > dboo --host=localhost --user=tom MyDB
dboo tom@MyDB>

tomas@tomsmbp:~/ > dboo MyDB -u=MyUser -p
Logging in as MyUser to MyDB on localhost:8822.
password: ****
dboo MyUser@MyDB>
tomas@tomsmbp:~/ > dboo -u=root -- create database MyOtherDB --groups=MyOtherGroup
Created database 'MyOtherDB'

# With a password
tomas@tomsmbp:~/ > dboo -u=root --password=MySecretPassword -- list users
MyOtherUser
MyUser
root

# With prompting for password
tomas@tomsmbp:~/ > dboo -u=root --password -- list users
Logging in as root to dboo::server on localhost:8822.
password: *********
MyOtherUser
MyUser
root

# Connect to database example_queries with password
tomas@tomsmbp:~/ > dboo example_queries -u=example_user -p=password

# With prompting for password
tomas@tomsmbp:~/ > dboo -u=root --password -- list users
Logging in as root to dboo::server on localhost:8822.
password: *********
MyOtherUser
MyUser
root