Database Reference
In-Depth Information
There are also several limits we can place on user accounts. These are given in
the following:
Limit
Description
MAX_QUERIES_PER_HOUR
The number of SQL statements or queries
the user account can issue per hour. This
includes updates.
MAX_UPDATES_PER_HOUR
The number of SQL update statements
(not queries) the user account can issue
per hour.
MAX_CONNECTIONS_PER_HOUR
The number of connections the user
account can start per hour.
MAX_USER_CONNECTIONS
The number of simultaneous connections
to the database server the user account
can have. If set to zero, the number will be
equal to the max_connections setting.
If the max_connections setting is also
zero then there is no limit to the number
of simultaneous connections.
Full documentation of the various privileges can be found at https://mariadb.
com/kb/en/grant/ .
Creating users
Creating a user in MariaDB is a two-step process. First, we create the user using the
CREATE USER statement, and then we give, or GRANT , the user the privileges we want
them to have. We'll go over the CREATE USER statement in this section and the GRANT
statement in the Granting permissions section.
A CREATE USER statement has the following pattern:
CREATE USER 'username'@'host' IDENTIFIED BY 'password';
We customize the username, host, and password parts to the appropriate values.
If we don't want to specify a password (not recommended!) then we can drop the
IDENTIFIED BY 'password' part. This and all SQL statements that we input into
MariaDB need to end with a semicolon ( ; ).
The host part can be several things. It can be the hostname of the computer the user
connects from, the IP address of the computer the user connects from, the network
the user connects from, or it can be the wildcard symbol % , which means any host.
Search WWH ::




Custom Search