Database Reference
In-Depth Information
the entire MariaDB server. You might have been using the root login
throughout the chapters in this topic, and that is fine when experimenting with
MariaDB on nonlive servers. But in the real world you'd never use root on a
day-to-day basis. Instead, you'd create a series of accounts, some for administra-
tion, some for users, some for developers, and so on.
Note
Preventing Innocent Mistakes It is important to note that access control is not just
intended to keep out users with malicious intent. More often than not, data nightmares
are the result of an inadvertent mistake, a mistyped MariaDB statement, being in the
wrong database, or some other user error. Access control helps avoid these situations
by ensuring that users are unable to execute statements they should not be executing.
Caution
Don't Use root The root login should be considered sacred. Use it only when
absolutely needed (perhaps if you cannot get in to other administrative accounts). root
should never be used in day-to-day MariaDB operations.
Managing Users
MariaDB user accounts and information are stored in a MariaDB database
named mysql . You usually do not need to access the mysql database and
tables directly (as you will soon see), but sometimes you might. One of those
times is when you want to obtain a list of all user accounts. To do that, use the
following code:
Input
USE mysql;
SELECT user FROM user;
Output
+------+
| user |
+------+
| root |
+------+
 
 
Search WWH ::




Custom Search