Hello, I tried to change collation for my Moodle by running this command:
php admin/cli/mysql_collation.php --collation=utf8mb4_cs_0900_ai_ci
Unfortunately I got bunch of errors with table groups:
Default exception handler: Chyba čtení z databáze Debug: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups WHERE collation IS NOT NULL' at line 1
SHOW FULL COLUMNS FROM groups WHERE collation IS NOT NULL
[array (
)]
Error code: dmlreadexception
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1186 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 167 of /admin/cli/mysql_collation.php: call to mysqli_native_moodle_database->get_recordset_sql()
!!! Chyba čtení z databáze !!!
!! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups WHERE collation IS NOT NULL' at line 1
SHOW FULL COLUMNS FROM groups WHERE collation IS NOT NULL
[array (
)]
Error code: dmlreadexception !!
!! Stack trace: * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1186 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 167 of /admin/cli/mysql_collation.php: call to mysqli_native_moodle_database->get_recordset_sql()
!!
Only fix I could do was deleting table groups, run script again (without error) and then recreate groups from modified SQL backup.
Did somebody also run into this problem?