Rechercher dans le manuel MySQL
17.4.1.8 Replication of CURRENT_USER()
The following statements support use of the
CURRENT_USER()
function to take
the place of the name of, and possibly the host for, an affected
user or a definer:
When binary logging is enabled and
CURRENT_USER()
or
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
master and the slave 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 master is replicated to the
slave as metadata, and the slave applies the statement to the
current user named in the metadata, rather than to the current
user on the slave.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-replication-features-current-user.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.