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: sqlite, ogr, mysql, odbc, dbf, pg, mesql
- 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
db.login sets login parameters such an user name and
optionally also a password for the connection to
the selected
database through the DB
driver.
This command is only related to SQL database
backends like
PostgreSQL,
MySQL or
ODBC.
Note that the passwords are stored in a hidden, unencrypted
file in the user account, specifically
- in the 'home' directory, i.e. $HOME/.grass7/dblogin (Unix-like systems)
- %APPDATA%/GRASS7/dblogin (MS-Windows)
Only the file owner can access this file.
Only username specified (assuming locally accessible PostgreSQL DB
without password):
db.login driver=pg database=mydb
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 driver=pg database=mydb user=bacava password=""
db.connect,
db.test,
db.tables
SQL support in GRASS GIS
Radim Blazek
Last changed: $Date: 2015-10-01 23:15:07 +0200 (Thu, 01 Oct 2015) $
Main index |
Database index |
Topics index |
Keywords index |
Full index
© 2003-2016
GRASS Development Team,
GRASS GIS 7.0.3 Reference Manual