GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
db.login(1) GRASS GIS User's Manual db.login(1)

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

database, connection settings

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

-p

Print connection settings and exit
--overwrite

Allow output files to overwrite existing files
--help

Print usage summary
--verbose

Verbose module output
--quiet

Quiet module output
--ui

Force launching GUI dialog

driver=name [required]

Name of database driver
Options: dbf, ogr, pg, sqlite
Default: sqlite
database=name [required]

Name of database
Default: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
user=string

Username
password=string

Password
host=string

Hostname
Relevant only for pg and mysql driver
port=string

Port
Relevant only for pg and mysql driver

db.login sets login parameters such an user name and optionally also a password, a hostname or a port for the connection to the selected database through the DB driver.

Options host and port are related to only 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, password and hostname specified (note that the command lines history will store the password in this way):


db.login driver=pg database=mydb user=bacava password=secret host=db.example.com

Username and empty password specified:


db.login driver=pg database=mydb user=bacava password=""

db.connect, db.test, db.tables

SQL support in GRASS GIS

Radim Blazek
Support for hostname and port by Martin Landa, OSGeoREL, Czech Technical University in Prague, Czech Republic (GRASS 7.1)

Available at: db.login source code (history)

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

© 2003-2021 GRASS Development Team, GRASS GIS 7.8.6 Reference Manual

GRASS 7.8.6

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.