I did the optimize and repair and I still get this message after I login.
Did a test upgrade from 3.4.6+ to latest 3.6.x ... MySQL 5.7.20
My charset is: utf8mb4
My collation is: utf8mb4_unicode_ci
Debug info: COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'utf8'
SELECT * FROM mdl_user WHERE LOWER(username) COLLATE utf8mb4_bin = LOWER(?) AND deleted <> 1 AND mnethostid = ?
[array (
0 => 'lng',
1 => '4',
)]
Error code: dmlreadexception
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1245 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1571 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1543 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 4810 of /lib/moodlelib.php: call to moodle_database->get_record_select()
line 4319 of /lib/moodlelib.php: call to get_complete_user_data()
line 143 of /login/index.php: call to authenticate_user_login()
Did a ../admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
and the mdl_user table came back with
- Error: Tried to convert mdl_user, but there was a problem. Please check the details of this table and try again.
Where do I check the details of this table? and how do I troubleshoot?
I think I need to replace something in my .sql file that I was using to import it into its database. A search or replace of some sort?
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| collation_connection | utf8_general_ci |
| collation_database | utf8mb4_unicode_ci |
| collation_server | utf8_general_ci |
+--------------------------+--------------------+