Moodle Version: 3.7.5
System: Ubuntu 18.04
I try to convert database encoding from utf8 to utf8mb4 with this manual: https://docs.moodle.org/37/en/MySQL_full_unicode_support
With one Installation no problem with the other I get an error:
/opt/plesk/php/7.3/bin/php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
Converting database to 'utf8mb4_unicode_ci' for https://carestream.lernyx.com:
Error: Tried to alter the database with no success. Please try manually changing the database
to the new collation and character set and then run this script again.
I have take a look on the code:
If i change
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
$sql = "ALTER DATABASE `$CFG->dbname` DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
Now it works.
Can somebody of moodle team fix this?