Professional Documents
Culture Documents
ANALYSE([max_elements[,max_memory]])
For example:
The results show some statistics for the values returned by the query,
and propose an optimal data type for the columns. This can be helpful
for checking your existing tables, or after importing new data. You may
need to try different settings for the arguments so that PROCEDURE
ANALYSE() does not suggest the ENUM data type when it is not
appropriate.
URL: http://dev.mysql.com/doc/refman/5.5/en/procedure-analyse.html
Syntax:
CREATE USER user_specification [, user_specification] ...
user_specification:
user [ identified_option ]
auth_option: {
IDENTIFIED BY 'auth_string'
| IDENTIFIED BY PASSWORD 'hash_string'
| IDENTIFIED WITH auth_plugin
| IDENTIFIED WITH auth_plugin AS 'hash_string'
}
The CREATE USER statement creates new MySQL accounts. An error occurs
if you try to create an account that already exists.
To use CREATE USER, you must have the global CREATE USER privilege or
the INSERT privilege for the mysql database. When the read_only system
variable is enabled, CREATE USER additionally requires the SUPER
privilege.
For each account, CREATE USER creates a new row in the mysql.user table
with no privileges and (as of MySQL 5.5.7) assigns the account an
authentication plugin. Depending on the syntax used, CREATE USER may
also assign the account a password.
Each user_specification clause consists of an account name and
information about how authentication occurs for clients that use the
account. This part of CREATE USER syntax is shared with GRANT, so the
description here applies to GRANT as well.
If you specify only the user name part of the account name, a host name
part of '%' is used.
o With IDENTIFIED WITH, the server assigns the specified plugin and the
account has no password. If the optional AS 'hash_string' clause is
also given, the string is stored as is in the authentication_string
column (it is assumed to be already hashed in the format required by
the plugin).
o With IDENTIFIED BY, the server assigns no plugin and assigns the
specified password.
o With neither IDENTIFIED WITH nor IDENTIFIED BY, the server assigns no
plugin and the account has no password.
For client connections that use a given account, the server invokes the
authentication plugin assigned to the account and the client must
provide credentials as required by the authentication method that the
plugin implements. If the server cannot find the plugin, either at
account-creation time or connect time, an error occurs.
o Changes to the account password using SET PASSWORD can be made with
PASSWORD(), with old_passwords set to 0 or 1 for 4.1 or pre-4.1
password hashing, respectively, or with OLD_PASSWORD(), which uses
pre-4.1 password hashing regardless of the value of old_passwords.
The server assigns the given authentication plugin to the account but
no password. Clients must provide no password when they connect.
However, an account with no password is insecure. To ensure that an
account uses a specific authentication plugin and has a password with
the corresponding hash format, specify the plugin explicitly with
IDENTIFIED WITH, then use SET PASSWORD to set the password:
o To avoid specifying the cleartext password if you know its hash value
(the value that PASSWORD() would return for the password), specify
the hash value preceded by the keyword PASSWORD:
URL: http://dev.mysql.com/doc/refman/5.5/en/create-user.html