This post explains why the mysql.sys@localhost user exists and what it is used for.
The mysql.sys@localhost user is a system user used as the definer for view, procedures, and functions in the sys schema. It was added in MySQL 5.7.9 to avoid issues if the DBA renames the root@localhost user. See also MySQL sys Schema in the Reference Manual.
The following applies to the mysql.sys@localhost user:
1. It is a required user as long as the sys schema is installed. Please do not drop the user.
2. It is locked by default, so it cannot be used to access MySQL:
mysql> SHOW CREATE USER 'mysql.sys'@localhost\G *************************** 1. row *************************** CREATE USER for mysql.sys@localhost: CREATE USER 'mysql.sys'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT LOCK 1 row in set (0.00 sec)
Notice the ACCOUNT LOCK.
3. It uses an invalid password (see the output of SHOW CREATE USER above). This ensures that should the account get unlocked by mistake, it is still impossible to login. It is thus recommended not to reset the password.