The character set & # 39; utf8mb4 & # 39; it is not a compiled character set and is not specified in the file & # 39; /usr/share/mysql/charsets/Index.xml'
InvalidArgumentException: There was a problem connecting to the database: SQLSTATE[HY000]  Unable to initialize the utf8mb4 character set (path: / usr / share / mysql / charsets /)
mysql See 14.14 Distrib 5.7.26
I'm trying to fix this error, but I can not fix it on an active server. I had to go through the procedure of adding the following to the
/usr/share/mysql/charsets/Index.xml file in a local virtual machine that worked.
UTF-8 MB4 Unicode
I have restarted mysql a couple of times since I updated this in vain. My database connection is shown as such
$ db = new PDO ("mysql: host = $ host; dbname = $ db; charset = utf8mb4", $ db_username, $ db_pass);
And all the variables in my database seem to be verified based on other publications I've seen
my.cnf has the following set also
set of characters-server = utf8mb4
collation-server = utf8mb4_unicode_ci