Errors in Database connection

From PSwiki
Revision as of 22:11, 2 July 2022 by Talad (talk | contribs) (Created page with " == 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]> SELE...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"