• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Short Guides for IT Professionals

MENUMENU
  • HOME
  • ALL TOPICS
    • Active Directory
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Virtualization
    • Web
    • Tools
  • ABOUT
  • SUBSCRIBE
Home » MySQL Query All Users and User Premissions

MySQL Query All Users and User Premissions

April 10, 2022 - by Zsolt Agoston - last edited on April 10, 2022

Use these commands in the mysql shell to get all mysql users and their permissions to databases:

# Get a list of users:
SELECT host,user,authentication_string FROM mysql.user;

# List Perms for a user:
SHOW GRANTS FOR 'user_name'@'localhost';

Example

MySQL Query All Users and User Premissions

Reader Interactions

Community Questions Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tools

Secondary Sidebar

  • Terms of Use
  • Disclaimer
  • Privacy Policy