bash view all users code example
Example 1: mysql show users
select * from mysql.user;
#or for less data
select user, host from mysql.user;
Example 2: sql server get users
select * from master.sys.server_principals
select * from mysql.user;
#or for less data
select user, host from mysql.user;
select * from master.sys.server_principals