My impression is that MySQL is generally not case-sensitive, especially in MS Windows. In MySQL 8.0.34, I ran the following statements and got an error for the last statement. The error message is "Error Code: 1141. There is no such grant defined for user 'USER1' on host '%'". Once I change "USER1" to "user1", it works. "GRANT SELECT ON DB1.TABLE1 TO USER1;" also won't work. Can you please explain why? Thank you very much.
DROP SCHEMA IF EXISTS db1;
CREATE SCHEMA db1;
USE db1;
CREATE TABLE Table1(
productID INT primary key
);
DROP USER IF EXISTS user1;
CREATE USER user1 IDENTIFIED BY 'password111';
SHOW GRANTS FOR USER1;
My system's character set and collation are 'utf8mb4', 'utf8mb4_0900_ai_ci' respectively.
https://dev.mysql.com/doc/refman/8.0/en/account-names.html
The
mysql.usertable has a columnuser, which stores the username in a column defined to use a binary collation. Thus it is case-sensitive.