#### 17.5.1.8 Replication of CURRENT\_USER()

 The following statements support use of the [`CURRENT_USER()`](information-functions.html#function_current-user) function to take the place of the name of, and possibly the host for, an affected user or a definer:

* [`DROP USER`](drop-user.html)

* [`RENAME USER`](rename-user.html)

* [`GRANT`](grant.html)

* [`REVOKE`](revoke.html)

* [`CREATE FUNCTION`](create-function.html)

* [`CREATE PROCEDURE`](create-procedure.html)

* [`CREATE TRIGGER`](create-trigger.html)

* [`CREATE EVENT`](create-event.html)

* [`CREATE VIEW`](create-view.html)

* [`ALTER EVENT`](alter-event.html)

* [`ALTER VIEW`](alter-view.html)

* [`SET PASSWORD`](set-password.html)

 When binary logging is enabled and [`CURRENT_USER()`](information-functions.html#function_current-user) or [`CURRENT_USER`](information-functions.html#function_current-user) is used as the definer in any of these statements, MySQL Server ensures that the statement is applied to the same user on both the source and the replica when the statement is replicated. In some cases, such as statements that change passwords, the function reference is expanded before it is written to the binary log, so that the statement includes the user name. For all other cases, the name of the current user on the source is replicated to the replica as metadata, and the replica applies the statement to the current user named in the metadata, rather than to the current user on the replica.

