1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>GRASS GIS manual: GRASS-MySQL embedded driver</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="stylesheet" href="grassdocs.css" type="text/css">
- </head>
- <body bgcolor="white">
- <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
- <!-- meta page description: MySQL embedded driver -->
- <h1>MySQL embedded driver in GRASS</h1>
- <h2>KEYWORDS</h2>
- database, attribute table, driver
- <h2>DESCRIPTION</h2>
- MySQL database driver in GRASS enables GRASS to store vector
- attributes in MySQL embedded database without necessity
- to run MySQL server.
- <h2>Driver and database name</h2>
- GRASS modules require 2 parameters to connect to a database.
- Those parameters are 'driver' and 'database'. For MySQL embedded
- driver the parameter 'driver' should be set to value 'mesql'.
- The parameter 'database' is a full path to the directory
- where database tables are stored. The best place is
- a directory in the mapset. The directory must be created
- before use of the driver. In the name of database
- it is possible to use 3 variables:
- <ul>
- <li> $GISDBASE - path to current GISBASE
- <li> $LOCATION_NAME - name of current location
- <li> $MAPSET - name of current mapset
- </ul>
- <p>
- Examples of connection parameters:
- <div class="code"><pre>
- db.connect driver=mesql database='$GISDBASE/$LOCATION_NAME/$MAPSET/mysql'
- db.connect driver=mesql database=/home/user1/db
- </pre></div>
- <h2>Data types, indexes</h2>
- For more information about supported data types and indexes
- see the documentation for <a href="grass-mysql.html">MySQL (mysql) driver</a>.
- <h2>Database type</h2>
- Because database closing was found very slow if InnoDB was used,
- the InnoDB storage is disabled by default (hardcoded
- '--skip-innodb' server option).
- <h2>Note</h2>
- The embedded server is started with hardcoded '--bootstrap'
- option to avoid warning about missing
- "mysql.time_zone_leap_second table". This can be fixed in future.
- <h2>Troubleshooting: SQL syntax error</h2>
- Attempting to use a reserved SQL word as column or table name will result
- in a "SQL syntax" error. The list of reserved words for MySQL can be
- found in the <a href="http://dev.mysql.com/doc/refman/5.7/en/reserved-words.html#table-reserved-words-5.7.4">MySQL manual</a>.
- <h2>SEE ALSO</h2>
- <em>
- <a href="db.connect.html">db.connect</a>,
- <a href="sql.html">SQL support in GRASS GIS</a>
- </em>
- <h2>Credits</h2>
- Development of the driver was sponsored by
- <a href="http://www.faunalia.it">Faunalia</a> (Italy)
- as part of a project for <a href="http://www.atac.roma.it/">ATAC</a>.
- <h2>AUTHOR</h2>
- Radim Blazek
- <p>
- <i>Last changed: $Date$</i>
- <hr class="header">
- <p><a href="index.html">Main index</a> - <a href="database.html">Database index</a> - <a href="topics.html">Topics index</a> - <a href="keywords.html">Keywords Index</a> - <a href="full_index.html">Full index</a></p>
- <p>© 2003-2019 <a href="https://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS 7.9 Reference Manual</p>
- </body>
- </html>
|