MySQL 8.0
phpMyAdmin
I have the following Session variables in MySQL (found in peformance_schema.session_variables
):
collation_connection utf8mb4_0900_ai_ci
collation_database utf8mb3_general_ci
collation_server utf8mb4_0900_ai_ci
These are different than my Global variables (performance_schema.global_variables
), which I have no problem editing.
When I try to update the collation_database
variable, I get an error:
UPDATE session_variables set collation_database = 'utf8mb4_0900_ai_ci'
//#1142 - UPDATE command denied to user 'root'@'localhost' for table 'session_variables'
I'm surprised that even the root user does not have the privilege to update this. I tried rebooting MySQL, thinking that the session gets cleared and then simply copies the global variables for the next session, but that did not work either. How does one update these session variables?
Maybe this is a phpMyAdmin-specific problem? I don't know. My goal is to set everything in MySQL to a character set of utf8mb4 and a collation of utf8mb4_0900_ai_ci, as MySQL 8.0 recommends.
I also tried the following, but it doesn't do anything:
SET SESSION collation_database = 'utf8mb4_0900_ai_ci'
The query gets executed, but nothing happens and the variable is still utf8mb3_general_ci
. It's as if MySQL is ignoring the query.