EnglishFrenchSpanish

Ad


OnWorks favicon

db.connectgrass - Online in the Cloud

Run db.connectgrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command db.connectgrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


db.connect - Prints/sets general DB connection for current mapset.

KEYWORDS


database, attribute table, connection settings

SYNOPSIS


db.connect
db.connect --help
db.connect [-pgcd] [driver=name] [database=name] [schema=name] [group=string]
[--help] [--verbose] [--quiet] [--ui]

Flags:
-p
Print current connection parameters and exit
Substitute variables in database settings

-g
Print current connection parameters using shell style and exit

-c
Check connection parameters, set if uninitialized, and exit

-d
Set from default settings and exit
Overwrite current settings if already initialized

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
driver=name
Name of database driver
Options: mysql, odbc, sqlite, pg, ogr, dbf
Default: sqlite

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

schema=name
Database schema
Do not use this option if schemas are not supported by driver/database server

group=string
Default group of database users to which select privilege is granted

DESCRIPTION


db.connect allows the user to set database connection parameters. These parameters are
then taken as default values by modules so that the user does not need to enter the
parameters each time.

The default database backend in GRASS GIS 7 is SQLite.

NOTES


Values are stored in the mapset’s VAR file; the connection is not tested for validity.

The -p flag will display the current connection parameters.

The -c flag will silently check if the connection parameters have been set, and if not
will set them to use GRASS’s default values. (useful in scripts before you attempt to
create a new database table)

To connect a vector map to a database table, use v.db.connect or v.db.addtable.

EXAMPLES


SQLite (default backend)
Local storage:
db.connect -d
db.connect -p
db.tables -p

The SQLite database file is created automatically when used the first time.

ODBC
Network storage, database tables stored in database "mydb" (may require the use of
db.login):
db.connect driver=odbc database=mydb
db.login user=myname [pass=secret]
db.connect -p
db.tables -p

PostgreSQL
Network storage, database tables stored in database "mydb" (may require the use of
db.login):
db.connect driver=pg database="host=myserver.itc.it,dbname=mydb"
db.login user=myname [pass=secret]
db.connect -p
db.tables -p

PostgreSQL with different port
Network storage, database tables stored in database "mydb" (may require the use of
db.login):
db.connect driver=pg database="host=myserver.itc.it,dbname=mydb,port=6666"
db.login user=myname [pass=secret]
db.connect -p
db.tables -p

MySQL (local connection)
Local storage (db.login may not be needed):
db.connect driver=mysql database=mydb
db.login user=myname [pass=secret]
db.connect -p
db.tables -p

MySQL (external server)
Network storage, database tables stored in database "mydb" (may require the use of
db.login):
db.connect driver=mysql database="host=myserver.itc.it,dbname=mydb"
db.login user=myname [pass=secret]
db.connect -p
db.tables -p

DBF (local, not recommended)
Local storage (the dbf/ subdirectory in the mapset must exist or must be created by the
user):
db.connect driver=dbf database=’$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/’
db.tables -p

Use db.connectgrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Zabbix
    Zabbix
    Zabbix is an enterprise-class open
    source distributed monitoring solution
    designed to monitor and track
    performance and availability of network
    servers, device...
    Download Zabbix
  • 2
    KDiff3
    KDiff3
    This repository is no longer maintained
    and is kept for archival purposes. See
    https://invent.kde.org/sdk/kdiff3 for
    the newest code and
    https://download.kde.o...
    Download KDiff3
  • 3
    USBLoaderGX
    USBLoaderGX
    USBLoaderGX is a GUI for
    Waninkoko's USB Loader, based on
    libwiigui. It allows listing and
    launching Wii games, Gamecube games and
    homebrew on Wii and WiiU...
    Download USBLoaderGX
  • 4
    Firebird
    Firebird
    Firebird RDBMS offers ANSI SQL features
    & runs on Linux, Windows &
    several Unix platforms. Features
    excellent concurrency & performance
    & power...
    Download Firebird
  • 5
    KompoZer
    KompoZer
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 6
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • More »

Linux commands

Ad