Получить всех пользователей со всеми полями:
[simterm]
MySQL [(none)]> select * from mysql.user;
[/simterm]
Или определённые поля – получаем список полей:
[simterm]
MySQL [(none)]> desc mysql.user; +--------------+----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+----------------+------+-----+---------+-------+ | Host | char(60) | NO | PRI | | | | User | char(32) | NO | PRI | | | | Select_priv | enum('N','Y') | NO | | N | | ...
[/simterm]
И повторяем SELECT
с указанием нужных полей:
[simterm]
MySQL [(none)]> select user, host from mysql.user; +-----------------------------+-----------+ | user | host | +-----------------------------+-----------+ | dbadmin | % | | mysql.sys | localhost | | rdsadmin | localhost | +-----------------------------+-----------+
[/simterm]