Error converting DB from SQLite to MySQL

I have been running NextCloud on Centos 7.9 for a few years. I’ve been using SQLite as the backend and that has worked fine for me (it’s a tiny and barely-used installation).

A few months ago, I got stuck on the update to version 26.0.1. The error message I saw was:

SQLSTATE[HY000]: General error: 1 near “(”: syntax error

I guess the update SQL statements were using syntax that SQLite didn’t understand. I left if for a few months, hoping that this error would be fixed, but nothing changed, so today decided to look into it a bit more deeply. I found some discussion suggesting that SQLite no longer worked and suggesting that people should switch to MySQL, MariaDB or PostgreSQL instead.

So, this morning I set up a MariaDB database and started the conversion:

$ php occ db:convert-type --all-apps mariadb [username] [dbname]

That didn’t work as “mariadb” is not a recognised type. So I tried again, pretending the database was MySQL instead.

$ php occ db:convert-type --all-apps mysql [username] [dbname]

This time, it got a lot further before displaying the same error message that I saw with the update that I was trying originally:

SQLSTATE[HY000]: General error: 1 near “(”: syntax error

So I’m now kind of stuck. I guess I could trash my existing installation and start again from scratch. But I’d rather hang onto the small amount of data that’s stored in my current installation.

What’s the best way to proceed from here?

Does no-one have any advice for me?