It is a very bad practice to modify system data directly instead of using SQL commands.
The solution is to use ALTER USER
command (see https://mariadb.com/kb/en/alter-user/) instead of trying to modify a system view.
In recent versions of MariaDB user data is stored in mysql.global_priv table, mysql.user is just a complex view which aggregates information from mysql.global_prov.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…