I have the same Pb :
Error in .local(drv, ...) :
Failed to connect to database: Error: Can't initialize character set unknown (path: compiled_in)
I try the solution of Hugo (modify the my.ini), David Guerin (using RMariaDB) but both are not working. After some research and experience this solution is working for me
Modify my.ini (this is the path to find C:\ProgramData\MySQL\MySQL Server 8.0
) :
By opposit to the answer of Hugo, you need to put utf8mb4 (utf8 is not the good one)
[client]
default-character-set = utf8 (the old line "utf" to "utfmb4")
default-character-set = utf8mb4 (the new line with modification)
[mysql]
default-character-set = utf8 (the old line "utf" to "utfmb4")
default-character-set = utf8mb4 (the new line with modification)
[mysqld]
character-set-client-handshake = FALSE (new line to add)
character-set-server = utf8mb4 (the old line "utf" to "utfmb4")
collation-server = utf8mb4_unicode_ci (new line to add)
skip-character-set-client-handshake (Line to remove)
In mysql, you need to change your password :
ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY 'mot-passe';