Hi,

I'm trying to get MySQL data access working but can't solve the issues I'm encountering. Part of my code looks like:

\startluacode
productsheet = productsheet or {}
function productsheet.sqldatabase(database,user,password)
   productsheet:sql(database,user,password)
end
function productsheet:sql(db,us,pw)
print("SQLDATABASE: database: " .. db)
print("SQLDATABASE: username: " .. us)
print("SQLDATABASE: password: " .. pw)
local sql = require("util-sql")
local presets = {database = db,username = us,password = pw,host= "localhost",port= 3306}
local template = [[SELECT `nom`, `name_alias` FROM `llx_societe` WHERE `nom` = '%nom%' ;]]
presets.id = "mysql"
local data, keys = utilities.sql.execute {presets=presets,template=template,variables={nom = "Life"}}
...


This generates the following issues:

sql > start loading method 'library'
lua error > lua error on line 153 in file /home/gverhaag/Stock/ProductSheet/productsheet_KG594.tex:
/usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:180: module 'luasql.mysql' not found:
no field package.preload['luasql.mysql']
no file '/usr/local/share/lua/5.2/luasql/mysql.lua'
no file '/usr/local/share/lua/5.2/luasql/mysql/init.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql/init.lua'
no file './luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/luasql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql.so'
stack traceback:
[C]: in function 'requiem'
/usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:180: in function </usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:165>
(...tail calls...)
...are/texmf/tex/context/base/mkiv/util-sql-imp-library.lua:74: in main chunk
[C]: in function 'requiem'
/usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:180: in function </usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:165>
(...tail calls...)
/usr/share/texmf/tex/context/base/mkiv/util-sql.lua:114: in function '__index'
/usr/share/texmf/tex/context/base/mkiv/util-sql.lua:288: in function 'execute'
[ctxlua]:21: in function 'sql'
[ctxlua]:5: in function 'sqldatabase'
[ctxlua]:1: in main chunk


Must be something basic, I guess! I use the TexLive 2017 version of ConTeXt.

Any idea what I'm doing wrong here?