The are a few users created by MySQL for various purposes ranging from handling the replication to be the definer for sys schema objects. The users are summarized in the following table:
User | First Version | Last Version | Feature | Comments |
---|---|---|---|---|
system user | (At least since 5.0) | Replication | Used for the I/O and SQL threads (connection and applier threads). This is not a real user, but just a label used in SHOW PROCESSLIST and similar places to indicate it is an internal user. There is no way to connect as the “system user”. | |
mysql.sys@localhost | 5.7.9 | sys schema | Used by the sys schema as the definer for views, stored procedures, and stored functions. The user by default has an invalid password and is locked, so it cannot be used to connect to MySQL. | |
_gr_user@localhost | 5.7.17 | 5.7.18 | Group Replication | Used for Group Replication and created with a secret password and the account locked. It can be useful to change the password to another one in case the account should become unlocked by mistake. Better: Upgrade to 5.7.19 or later (latest release recommended) where the _gr_user@localhost user has been replaced by the mysql.session@localhost user. |
mysql.session@localhost | 5.7.19 | Plugins | Used internally by plugins to access the server. The user by default has an invalid password and is locked, so it cannot be used to connect to MySQL. | |
mysql.infoschema@localhost | 8.0.4 | Information Schema | Used as the DEFINER for INFORMATION_SCHEMA views. Use of the mysql.infoschema account avoids problems that occur if a DBA renames or removes the root account. This account is locked so that it cannot be used for client connections. |