Hi,
after upgrading Moodle from 3.1.4 to 3.1.7 and using the Scheduled task for LDAP-Snyc, I've recognized that some new users where missing, and started LDAPsysc by CLI.
I got the following error message:
[AUTH LDAP] The users sync cron has been deprecated. Please use the scheduled task instead. Default exception handler: Fehler beim Lesen der Datenbank Debug: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' SELECT u.* FROM mdl_user u LEFT JOIN mdl_tmp_extuser e ON (u.username = e.username AND u.mnethostid = e.mnethostid) WHERE u.auth = ? AND u.deleted = 0 AND e.username IS NULL [array ( 0 => 'ldap', )] Error code: dmlreadexception * line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown * line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 765 of /auth/ldap/auth.php: call to mysqli_native_moodle_database->get_records_sql() * line 70 of /auth/ldap/cli/sync_users.php: call to auth_plugin_ldap->sync_users()After that I checked config.php
...
$CFG->dboptions = array(
'dbpersist' => false, // should persistent database connections be
// used? set to 'false' for the most stable
// setting, 'true' can improve performance
// sometimes
'dbsocket' => false, // should connection via UNIX socket be used?
// if you set it to 'true' or custom path
// here set dbhost to 'localhost',
// (please note mysql is always using socket
// if dbhost is 'localhost' - if you need
// local port connection use '127.0.0.1')
'dbport' => '', // the TCP port number to use when connecting
// to the server. keep empty string for the
// default port
'dbcollation' => 'utf8_unicode_ci', // MySQL has partial and full UTF-8
// support. If you wish to use partial UTF-8
// (three bytes) then set this option to
// 'utf8_unicode_ci', otherwise this option
// can be removed for MySQL (by default it will
// use 'utf8mb4_unicode_ci'. This option should
// be removed for all other databases.
);
and the db.opt seems to be ok as well:
default-character-set=utf8
default-collation=utf8_unicode_ci
Where does utf8_general_ci come from? How can I correct the error?
We're using MYSQL 5.5.49 and PHP 5.6.20.
Cheers,
Monica