Error reading from database Moodle 3.5 when install

Re: Error reading from database Moodle 3.5 when install

by Ashraf Mousa -
Number of replies: 2
I already solve this problem by correct the config.php file to match the database from "utf8mb4_unicode_ci" to "utf8_bin" because I made my database as "utf8_bin", so anyone who faces this problem should try this solution.
In reply to Ashraf Mousa

Re: Error reading from database Moodle 3.5 when install

by Jeff Lewis -
I found a similar fix here. I kept getting the error when trying to add a New User or change the email address of a User. Not sure if Softaculous update from 10.5 to 11 was to blame, since hadn't tried to add/update any users from 3.11 through to our latest 3.11.4 incremental updates.

In our case, the dbcollation was 'utf8mb4_unicode_ci', so I simply changed it to 'utf8_unicode_ci'
In reply to Jeff Lewis

Re: Error reading from database Moodle 3.5 when install

by Jeff Lewis -
Unfortunately, removing "mb4" from the dbcollation is not a perfect fix.  It resulted in the following Server check issue:

"mysql_full_unicode_support if this test fails, it indicates a potential problem

The current setup of MySQL or MariaDB is using 'utf8'. This character set does not support four byte characters which include some emoji. Trying to use these characters will result in an error when updating a record, and any information being sent to the database will be lost. Please consider changing your settings to 'utf8mb4'. See the documentation for full details. "
Other Check error from editing config.php dbcollation