Charset error on ojs installation page

Hello, guys.

I’m trying to run an ojs-3_1_1-4 version on my machine - it’s my first attempt with this project - and always got the following error after submit the ‘ojs installation’ page:

Errors occurred during installation
A database error has occurred: Server sent charset unknown to the client. Please, report to the developers

I’m trying to use Lucas Diedrich’s repository. I already tried to comment all volume information from pkp-ojs service, which gives me a default file with:

client_charset = utf-8
connection_charset = Off
database_charset = Off

but also tried to define a config/ file which is synchronized by a volume that gives me this configurations:

client_charset = utf-8
connection_charset = uft8
database_charset = uft8

and left all other configs the same way of the default template, but still got the same error.

I also tried the marcbria/docker4ojs repository, and got the same error :disappointed:

Looking for the character encoding troubleshooting guide I executed the instructions show variables like ‘char%’; and show variables like ‘collation%’; on my mysql container that gave me the results

| Variable_name | Value |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql-8.0/charsets/ |

| Variable_name | Value |
| collation_connection | latin1_swedish_ci |
| collation_database | utf8mb4_0900_ai_ci |
| collation_server | utf8mb4_0900_ai_ci |

I think the problem isn’t on the docker images/composes from this two repositories, I guess is some configuration that I don’t realize yet since the mysql container is running on default configurations, that’s because I’m searching for help here and not on these repositories.

Someone can help me? :sweat_smile:

Hi @rockenbach,

I think that’s at the level of the DBMS (MySQL/MariaDB) and PHP’s database driver support – somewhere below the level of OJS. I’d suggest looking at some of the suggestions here: MySQL Bugs: #85946: MySQL 8.0.1 breaks php compatibilty

Alec Smecher
Public Knowledge Project Team

Thanks for your answer, @asmecher.

In the end the problem were with the latest mysql’ version that changed the default value of the character_set_server and this was causing this issue (more info here and here). As my goal was just setup an OJS version to see if it attends to my requirements, I just change de mysql’ version to mysql:5.7 and everything is working fine.