grass-mesql(1)
π grass-mesql β MySQL embedded driver β¨
okay bestie, welcome to the GRASS GIS User's Manual page for grass-mesql, aka the MySQL embedded driver. grab a snack, this one's cute AND useful π«Ά
πΈ MySQL embedded driver
So like. The MySQL database driver lets GRASS store vector attributes in a MySQL embedded database β no MySQL server running required. no server, no drama, no systemctl meltdown. it's giving self-sufficient queen π
π Driver and database name
GRASS modules need 2 parameters to connect to a database, bestie. those parameters are 'driver' and 'database'.
- For the MySQL embedded driver, the 'driver' parameter should be set to the value
mesql. yes,mesql, notmysql. iykyk. - The 'database' parameter is a full path to the directory where database tables are stored. the best place for it is a directory in the mapset. and listen β the directory must be created before use of the driver. it will not make itself. it is not that girl. create it first π
And in the name of the database you can use 3 variables:
$GISDBASEβ path to current GISBASE$LOCATION_NAMEβ name of current location$MAPSETβ name of current mapset
Examples of connection parameters, copy them exactly bestie:
db.connect driver=mesql database='$GISDBASE/$LOCATION_NAME/$MAPSET/mysql'
db.connect driver=mesql database=/home/user1/db
π Data types, indexes
For more info about supported data types and indexes, go check the documentation for the MySQL (mysql) driver. that's the main character, this is the spinoff β¨
ποΈ Database type
Okay so tea time: because database closing was found very slow when InnoDB was used, the InnoDB storage is disabled by default β it's hardcoded with the --skip-innodb server option. not a config you toggle, a whole hardcoded vibe. periodt π
π Note
The embedded server is started with the hardcoded --bootstrap option, and that's specifically to avoid the warning about the missing "mysql.time_zone_leap_second table". this can be fixed in future. for now it just... is. π
π¨ Troubleshooting: SQL syntax error
If you try to use a reserved SQL word as a column or table name, you're gonna get a "SQL syntax" error. that's it, that's the whole thing. the list of reserved words for MySQL lives in the MySQL manual β go peek before you name anything order or select, i'm begging π
π AUTHOR
Radim Blazek
Credits: Development of the driver was sponsored by Faunalia (Italy) as part of a project for ATAC. shoutout π«Ά
π SEE ALSO
db.connect- SQL support in GRASS GIS
π SOURCE CODE
Available at: MySQL embedded driver source code (history)
Accessed: Saturday Jan 17 05:40:32 2026
Main index | Topics index | Keywords index | Graphical index | Full index
and that's a wrap bestie π this was the grass-mesql(1) page from the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team. version 8.4.2, slayed as always. go forth and embed ur MySQL πβ¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms