On Wed, Dec 04, 2019 at 08:16:49PM +0100, Bjoern Schiessle wrote:
> Hi,
> 
> I run the XMPP server Prosody on a Debian server which I recently
> updated to Buster. Since the update the Prosody server refuses to
> connect to the MariaDB database. The log shows following error:
> 
> Nov 30 22:09:15 sql debug   Connecting to [MySQL] prosody...
> Nov 30 22:09:15 sql debug   Database connection was closed. Will
> reconnect and retry.
> Nov 30 22:09:15 sql debug   Retrying SQL transaction
> [function(mod_storage_sql.lua:137)]
> Nov 30 22:09:15 sql debug   Connecting to [MySQL] prosody...
> Nov 30 22:09:15 sql debug   SQL transaction retry failed
> Nov 30 22:09:15 sql error   Error in SQL transaction:
> /usr/local/share/lua/5.2/DBI.lua:53: Cannot load driver MySQL.
       ^^^^^

Hm. This looks like a locally installed driver, not the
distribution's...

> Available drivers are: SQLite3
> 
> It looks like the MySQL driver is not installed. But both packages,
> "lua-dbi-mysql/stable,now 0.7.1-2 amd64" and "lua-sql-mysql/stable,now
> 2.3.4-1+b1 amd64" are installed.

Perhaps you can play around by setting the environment variables
LUA_PATH (and/or LUA_CPATH) to have /usr/share/lua before
/usr/local/share/lua?

Or, if you don't need the stuff in /usr/local/share/lua, perhaps
move it out of the way.

What's the version of Lua you're using (Buster has the whole
array from 5.0 to 5.3 on offer, it seems).

> If I install additionally "lua-dbi-postgresql" the last error message
> changes to:
> 
> Nov 30 22:09:15 sql error   Error in SQL transaction:
> /usr/local/share/lua/5.2/DBI.lua:53: Cannot load driver MySQL.
> Available drivers are: SQLite3, PostgreSQL
> 
> Therefore I assume that the lua-dbi-* packages are the right one. But
> for some reasons the MySQL driver is not detected/installed correctly.

Yes, but most probably it's finding the wrong ones, in /usr/local

Cheers
-- tomás

Attachment: signature.asc
Description: Digital signature

Reply via email to