[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Lua doesn't load the MySQL driver



On Thu, Dec 05, 2019 at 12:02:52PM +0100, Bjoern Schiessle wrote:
> On Wed, 2019-12-04 at 21:48 +0100, tomas@tuxteam.de wrote:
> > 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...
> 
> That's interesting. I didn't noticed it. A apt-file search for this
> file doesn't give me any result. Also no luarocks packages are
> installed according to "loarocks list".

As far as I know, Debian packages won't install to /usr/local. This
is the realm of the sysadmin to install non-Debian software locally.

> Maybe this come from another repository I no longer use. Is there a way
> to find out from which package/source the file was originally installed
> beside apt-file, which only works if the repository with the package is
> still there?

I don't think this comes from a Debian package at all: I'm pretty sure
this would be considered a packaging bug.

[...]

> So now it tries to load the "official" source. But the mysql driver is
> still not found. What still confuses me, that the Postgresql driver
> installed from the Debian repository is recognized correctly. So it
> seems to look at the right places but something seems to be different
> if it comes to the mysql driver.
> 
> > What's the version of Lua you're using [...]?

> I'm using Lua  5.2.4 

OK, thanks. 

Searching for available Lua MySQL packages yields (on buster):

  lua-dbi-mysql/stable 0.7.1-2 amd64
  lua-sql-mysql/stable 2.3.4-1+b1 amd64

I see from your original post that you have both installed. Now I'm
out of my depth -- I'd try purging and re-installing lua-dbi-mysql,
perhaps its config got broken by something.

Sorry, I haven't a mysql installation around for testing...

Cheers
-- tomás

Attachment: signature.asc
Description: Digital signature


Reply to: