Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2016
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Users and Database

    Good Afternoon Everyone,

    Is it possible to get a list of users and what databases they have under that username please
    using MySQL query, or do I have to create a php script or bash..

    Please advisee

    All the best and Thank you from Alan

  2. #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    8,634
    Thanks
    4
    Thanked 851 Times in 840 Posts
    Yes you can run a query on the user table of the mysql data base to get that information (that's the table and database where it is stored). You'll need to use the root user to do the query as that will probably be the only user with access to that database.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  3. #3
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    3,319
    Thanks
    2
    Thanked 231 Times in 224 Posts
    The user table will give you the list of users and where they're allowed to connect from but not what databases they can access. For that second part, you need to query the db table.
    Last edited by FishMonger; 04-02-2016 at 04:51 PM.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •