## NAME

db.login - Sets user/password for DB driver/database.

## KEYWORDS

database, connection settings

## SYNOPSIS

db.login
db.login --help
db.login [-p] driver=name database=name [user=string] [password=string] [--help] [--verbose] [--quiet] [--ui]

### Flags:

-p
  Print connection settings and exit
--help
  Print usage summary
--verbose
  Verbose module output
--quiet
  Quiet module output
--ui
  Force launching GUI dialog

### Parameters:

driver=name [required]
  Name of database driver
  Options: dbf, odbc, ogr, pg, sqlite
  Default: sqlite
database=name [required]
  Name of database
  Default: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
user=string
  Username to set for DB connection
password=string
  Password to set for DB connection

## DESCRIPTION

db.login sets the user name and optionally also a password for the connection to the selected database through the DB driver.

## NOTE

This is only related to SQL database backends like PostgreSQL, MySQL or ODBC. The passwords are stored in a hidden, unencrypted file in the user account ('home' directory) called .grass7/dblogin. Only the file owner can access this file.

## EXAMPLES

Only username specified:

    db.login user=bacava

Username and password specified (note that the command lines history will store the password in this way):

    db.login user=bacava password=secret

Username and empty password specified (note that the command lines history will store the password in this way):

    db.login user=bacava password=""

## SEE ALSO

db.connect, db.test

SQL support in GRASS GIS

## AUTHOR

Radim Blazek

Last changed: $Date: 2014-11-28 10:58:18 +0100 (pá, 28 XI 2014) $

Main index | Database index | Topics index | Keywords index | Full index

© 2003-2015 GRASS Development Team, GRASS GIS 7.0.0 Reference Manual