db.login(1grass)

db.login1grass

Sets user/password for db driver/database.

Usage

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]

Keywords

database, connection settings

Overview

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.

Note

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/.grass8/dblogin (Unix-like systems)

•

%APPDATA%\Roaming\GRASS8\dblogin (MS-Windows)

Only the file owner can access this file.

Examples

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=""

Source code

Available at: db.login source code (history)

Accessed: Monday Feb 24 17:50:22 2025

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

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

Releases

10 releases since Debian 4.0 (Etch); the text changed 9 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13

Author

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

From grass-doc 8.4.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.