Mysql Account AccountName -- username and hostname mysql Account Name
The following is an explanation of mysql5.6 Reference Manual:
MySQL account names consist of a user name and a host name. This enables creation of accounts for users with the same name who can connect from different hosts.
That is to say, the mysql account is composed of a user name and a host name to distinguish the same user name on different hosts.
Write account names using the following rules:
-
Syntax for account names is 'user _ name' @ 'host _ name '.
-
An account name consisting only of a user name is equivalent to 'user _ name' @ '%'. For example, 'me' is equivalent to 'me' @ '% '.
-
The user name and host name need not be quoted (reference) if they are legal (valid) as unquoted identifiers. quotes are necessary to specify a user_name string containing special characters (such as "-"), or a host_name string containing special characters or wildcard (wildcard) characters (such as "% "); for example, 'Test-user' @ '%. com '.
-
Quote user names and host names as identifiers or as strings, using either backticks (""), single quotation marks ("), or double quotation marks ("). (use single or double quotation marks)
-
The user name and host name parts, if quoted, must be quoted separately. that is, write 'me' @ 'localhost', not 'Me @ localhost'; the latter is interpreted as 'Me @ localhost' @ '% '.
-
A reference to the CURRENT_USER or CURRENT_USER () function is equivalent to specifying the current client's user name and host name literally.
See: http://dev.mysql.com/doc/refman/5.6/en/account-names.html