pydio / cells

Future-proof content collaboration platform
https://pydio.com
GNU Affero General Public License v3.0
1.78k stars 173 forks source link

Charset / utf8mb4 related trouble running cells configure #512

Open localhost opened 11 months ago

localhost commented 11 months ago

Hi, I'm using cells configure --cli to set up a new instance running on Alpine Linux 3.18.

MariaDB (10.11.5) is running on the local machine.

I also ran the following SQL statements, as given in the documentation:

CREATE USER 'pydio'@'localhost' IDENTIFIED BY '<your-password-here>';
CREATE DATABASE cells DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
GRANT ALL PRIVILEGES ON cells.* to 'pydio'@'localhost';
FLUSH PRIVILEGES;

The MySQL user can successfully connect to the local instance.

Now, if I run cells configure to set up the DB connection, I get the following error (it happens after successful authentication):

Cannot connect to database, please review the parameters: Charset is not supported for this version of MySQL

In the source, a check for charset 'utf8mb4' happens here:

https://github.com/pydio/cells/blob/8b454d0c1ae4a7f4fed74633a04b1b4eb3058f2f/discovery/install/lib/database.go#L301C20-L301C27

I wonder why there's a check for the default and installation recommended charset and then failing if so.

If I return nil from that check and recompile cells, then the installation proceeds and finally succeeds.

My guess is that I'm not seeing something clearly here. Did I set up the database wrong?