FreeKB - mySQL / MariaDB display users using the SELECT USERS statement
mySQL / MariaDB - display users using the SELECT USERS statement

This assume you are able to log into your MariaDB or mySQL server or you have configured passwordless authentication and will be using the -e command line option. 

The user table in the mysql database your mysql users. You can display the users in the mysql user table like this.

mysql -e "use mysql; select * from user \G"

 

Or like this.

mysql -e "select * from mysql.user \G"

 

Something like this should be returned for each user.

                  Host: %
                  User: john.doe
              Password: *B87A204DF7CFB2D1ABC123456JFH0DC081CD35EF2
           Select_priv: Y
           Insert_priv: Y
           Update_priv: Y
           Delete_priv: Y
           Create_priv: Y
             Drop_priv: Y
           Reload_priv: N
         Shutdown_priv: N
          Process_priv: N
             File_priv: N
            Grant_priv: Y
       References_priv: N
            Index_priv: N
            Alter_priv: Y
          Show_db_priv: N
            Super_priv: N
 Create_tmp_table_priv: N
      Lock_tables_priv: N
          Execute_priv: N
       Repl_slave_priv: N
      Repl_client_priv: N
      Create_view_priv: N
        Show_view_priv: N
   Create_routine_priv: N
    Alter_routine_priv: N
      Create_user_priv: N
            Event_priv: N
          Trigger_priv: N
Create_tablespace_priv: N
              ssl_type:
            ssl_cipher:
           x509_issuer:
          x509_subject:
         max_questions: 0
           max_updates: 0
       max_connections: 0
  max_user_connections: 0
                plugin:
 authentication_string:

 

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter db722 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |