grass-mesql.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>GRASS GIS manual: GRASS-MySQL embedded driver</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <link rel="stylesheet" href="grassdocs.css" type="text/css">
  7. </head>
  8. <body bgcolor="white">
  9. <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
  10. <!-- meta page description: MySQL embedded driver -->
  11. <h1>MySQL embedded driver in GRASS</h1>
  12. <h2>KEYWORDS</h2>
  13. database, attribute table, driver
  14. <h2>DESCRIPTION</h2>
  15. MySQL database driver in GRASS enables GRASS to store vector
  16. attributes in MySQL embedded database without necessity
  17. to run MySQL server.
  18. <h2>Driver and database name</h2>
  19. GRASS modules require 2 parameters to connect to a database.
  20. Those parameters are 'driver' and 'database'. For MySQL embedded
  21. driver the parameter 'driver' should be set to value 'mesql'.
  22. The parameter 'database' is a full path to the directory
  23. where database tables are stored. The best place is
  24. a directory in the mapset. The directory must be created
  25. before use of the driver. In the name of database
  26. it is possible to use 3 variables:
  27. <ul>
  28. <li> $GISDBASE - path to current GISBASE
  29. <li> $LOCATION_NAME - name of current location
  30. <li> $MAPSET - name of current mapset
  31. </ul>
  32. <p>
  33. Examples of connection parameters:
  34. <div class="code"><pre>
  35. db.connect driver=mesql database='$GISDBASE/$LOCATION_NAME/$MAPSET/mysql'
  36. db.connect driver=mesql database=/home/user1/db
  37. </pre></div>
  38. <h2>Data types, indexes</h2>
  39. For more information about supported data types and indexes
  40. see the documentation for <a href="grass-mysql.html">MySQL (mysql) driver</a>.
  41. <h2>Database type</h2>
  42. Because database closing was found very slow if InnoDB was used,
  43. the InnoDB storage is disabled by default (hardcoded
  44. '--skip-innodb' server option).
  45. <h2>Note</h2>
  46. The embedded server is started with hardcoded '--bootstrap'
  47. option to avoid warning about missing
  48. "mysql.time_zone_leap_second table". This can be fixed in future.
  49. <h2>Troubleshooting: SQL syntax error</h2>
  50. Attempting to use a reserved SQL word as column or table name will result
  51. in a "SQL syntax" error. The list of reserved words for MySQL can be
  52. 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>.
  53. <h2>SEE ALSO</h2>
  54. <em>
  55. <a href="db.connect.html">db.connect</a>,
  56. <a href="sql.html">SQL support in GRASS GIS</a>
  57. </em>
  58. <h2>Credits</h2>
  59. Development of the driver was sponsored by
  60. <a href="http://www.faunalia.it">Faunalia</a> (Italy)
  61. as part of a project for <a href="http://www.atac.roma.it/">ATAC</a>.
  62. <h2>AUTHOR</h2>
  63. Radim Blazek
  64. <p>
  65. <i>Last changed: $Date$</i>
  66. <hr class="header">
  67. <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>
  68. <p>&copy; 2003-2019 <a href="https://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS 7.9 Reference Manual</p>
  69. </body>
  70. </html>