Errors in Database connection
Jump to navigation
Jump to search
Error: Can't initialize character set unknown (path: compiled_in)
LogSQL: Error: Failed to connect to database: Error: Can't initialize character set unknown (path: compiled_in)
This happened after we upgraded on Windows the mysql DB from 5.5 to 8.0.29. This error was present when starting the PSUnreal server.
We have seen the DB was using a character set utf8_mb4, collation: utf8mb4_0900_ai_ci , checking production db on linux
MariaDB [planeshift_prod2]> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@character_set_database | @@collation_database | +--------------------------+----------------------+ | utf8mb4 | utf8mb4_general_ci | +--------------------------+----------------------+ 1 row in set (0.000 sec)
We edited mysql.ini file adding these two lines:
character-set-server = utf8mb4 collation-server = utf8mb4_general_ci
and ensured that the db startup was using the proper ini file:
mysqld --defaults-file="E:/MySQL80Data/my.ini" --datadir="E:/MySQL80Data/Data"