## NAME

db.connect - Set up connection to the database through DBMI.
(GRASS DB Program)

## SYNOPSIS

db.connect
db.connect help
db.connect [-p] [driver=name] [database=name] [location=name] [user=name] [password=name] [key=name]

## DESCRIPTION

db.connect allows the user to set parameters for connection to database. These parameters are then taken by modules as default values and user do not need enter parameters each time. Values are stored in user file.

## OPTIONS

When invoked simply as db.connect, the program prompts the user for parameters. The user can run the program non-interactively, specifying the (optional) flag setting and parameters values on the command line. Program flag and parameters are described below.

### Flags:

-p
  Print only current settings.

### Parameters:

driver=name
  The name of a DBMI driver. Currently only the odbc driver is available. You can use db.drivers to list available drivers.
database=name
  The name of a database. You can use db.databases to list available databases.
location=name
  The location of the database.
user=name
  The database user name (login).
password=name
  The database user password. Warning: password is saved in .grassrc in readable form!!!
key=name
  The key column name. Key column is column corresponding to categories.

## EXAMPLE

  db.connect driver=odbc database=gtest key=id

  ## SEE ALSO

  db.drivers db.databases

  ## AUTHOR

  Radim Blazek

  Last changed: $Date: 2002/04/09 09:19:22 $