To modify the user password in TiDB, it is recommended to use
ALTER USER (for example,
ALTER USER 'test'@'localhost' IDENTIFIED BY 'mypass';), not
UPDATE mysql.user which might lead to the condition that the password in other nodes is not refreshed timely.
It is recommended to use the official standard statements when modifying the user password and privilege. For details, see TiDB user account management.