Browse Source

db.connect: update manual to use `db.login host= port=`

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65084 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 years ago
parent
commit
2e5d51e825
1 changed files with 22 additions and 21 deletions
  1. 22 21
      db/db.connect/db.connect.html

+ 22 - 21
db/db.connect/db.connect.html

@@ -32,69 +32,70 @@ db.tables -p
 <p>The SQLite database file is created automatically when used the first time.
 
 
-<h3>ODBC</h3>
+<h3>PostgreSQL (local connection)</h3>
 
-Network storage, database tables stored in database "mydb"
+Local storage, database tables stored in database "mydb"
 (may require the use of <em><a href=db.login.html>db.login</a></em>):
-<br> 
+<br>
 <div class="code"><pre>
-db.connect driver=odbc database=mydb
-db.login user=myname [pass=secret]
+db.connect driver=pg database=mydb
+db.login user=myname pass=secret
 db.connect -p
 db.tables -p
 </pre></div>
 
 
-<h3>PostgreSQL</h3>
+<h3>PostgreSQL (network connection)</h3>
 
 Network storage, database tables stored in database "mydb"
 (may require the use of <em><a href=db.login.html>db.login</a></em>):
 <br>
 <div class="code"><pre>
-db.connect driver=pg database="host=myserver.itc.it,dbname=mydb"
-db.login user=myname [pass=secret]
+db.connect driver=pg database=mydb
+db.login user=myname pass=secret host=myserver.com port=6666
 db.connect -p
 db.tables -p
 </pre></div>
 
 
-<h3>PostgreSQL with different port</h3>
+<h3>MySQL (local connection)</h3>
 
-Network storage, database tables stored in database "mydb"
-(may require the use of <em><a href=db.login.html>db.login</a></em>):
+Local storage, database tables stored in database "mydb" (may require
+the use of <em><a href=db.login.html>db.login</a></em>):
 <br>
 <div class="code"><pre>
-db.connect driver=pg database="host=myserver.itc.it,dbname=mydb,port=6666"
-db.login user=myname [pass=secret]
+db.connect driver=mysql database=mydb
+db.login user=myname pass=secret
 db.connect -p
 db.tables -p
 </pre></div>
 
 
-<h3>MySQL (local connection)</h3>
+<h3>MySQL (network connection)</h3>
 
-Local storage (<em><a href=db.login.html>db.login</a></em> may not be needed):
+Network storage, database tables stored in database "mydb"
+(may require the use of <em><a href=db.login.html>db.login</a></em>):
 <br>
 <div class="code"><pre>
 db.connect driver=mysql database=mydb
-db.login user=myname [pass=secret]
+db.login user=myname pass=secret host=myserver.com
 db.connect -p
 db.tables -p
 </pre></div>
 
-
-<h3>MySQL (external server)</h3>
+<h3>ODBC</h3>
 
 Network storage, database tables stored in database "mydb"
 (may require the use of <em><a href=db.login.html>db.login</a></em>):
-<br>
+<br> 
 <div class="code"><pre>
-db.connect driver=mysql database="host=myserver.itc.it,dbname=mydb"
-db.login user=myname [pass=secret]
+db.connect driver=odbc database=mydb
+db.login user=myname pass=secret
 db.connect -p
 db.tables -p
 </pre></div>
 
+
 <h3>DBF (local, not recommended)</h3>
 
 Local storage (the dbf/ subdirectory in the mapset must exist or must be