The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

phpmyadmin shows all user's databases

Discussion in 'Database Discussions' started by rushman, Oct 24, 2005.

Thread Status:
Not open for further replies.
  1. rushman

    rushman Active Member

    Joined:
    Sep 21, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Cpanel build: 10.8.1-CURRENT 3

    When any user logs in to phpmyadmin the database dropdown list shows all users databases. You can only access your own, but I would hope there is a way to hide the other user's databases.
     
  2. ecwebtechie

    ecwebtechie Well-Known Member

    Joined:
    Mar 22, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    mysql configuration
    edit /etc/my.cnf(my.cnf location differs according to your installation)


    Add this to the bottom of the file if it is not there already.

    safe-show-database

    and restart mysql
     
  3. paulm

    paulm Well-Known Member

    Joined:
    Oct 13, 2003
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    I got a report from a client the other day about this also but when I logged in I could not see it and they could not reproduce it either but they did send me a screenshot which did include all databases listed.

    I searched here and saw the same suggestions of adding that line to my.cnf but I already had this in there.

    There is an issue obviously but it seems hard to reproduce and is totally random.

    The good news is however the client said they did try to access the databases and were unable to but still I see even being able to list all the databases as a fairly serious security issue.
     
  4. rushman

    rushman Active Member

    Joined:
    Sep 21, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    safe-show-database is already in there, and it still shows them all. It looks like it is more of a phpmyadmin issues, as it didn't happen until the new version of phpmyadmin was installed by cpanel.
     
  5. ServerGuru

    ServerGuru Member

    Joined:
    Apr 18, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Adding "safe-show-database" to mysql config file don't solve the problem becuase "safe-show-database" depreciated in mysql 4.1

    Thanks
     
  6. JimboJ40

    JimboJ40 Active Member

    Joined:
    Jul 10, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Enter mysql as root, then:
    UPDATE mysql.user SET Lock_tables_priv = 'N', Create_tmp_table_priv = 'N' WHERE
    User != 'root'; FLUSH PRIVILEGES;

    :)
     
  7. ecwebtechie

    ecwebtechie Well-Known Member

    Joined:
    Mar 22, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Show database privilege has to be set correctly for all user accounts

    The SHOW DATABASES privilege allows the account to see database names by issuing the SHOW DATABASE statement. Accounts that do not have this privilege see only databases for which they have some privileges, and cannot use the statement at all if the server was started with the --skip-show-database option
     
  8. Rubas

    Rubas Well-Known Member

    Joined:
    Sep 15, 2003
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    /scripts/cleanupmysqlprivs

    Fixed for me the problem.
     
  9. rushman

    rushman Active Member

    Joined:
    Sep 21, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    There you go. Thanks, that script worked. Is there a comprehensive list of scripts and descriptions somewhere? (other than ls /scripts :) )
     
  10. The MAzTER

    The MAzTER Well-Known Member

    Joined:
    Jul 3, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    FFS, same problem again after updating!!!

    TEST YOUR STUFF BEFORE RELEASING IT DAMNED!
     
  11. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    I experienced this same thing this morning but luckily noticed it within minutes of updating the first server. Kinda freaky when you go to add show-databases line to the config and it's there already. Perhaps this should be made a sticky? Somewhat large issue for us shared hosts... ;)
     
  12. The MAzTER

    The MAzTER Well-Known Member

    Joined:
    Jul 3, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    the most idiotic thing is that i have to do this every day now (cleanupmysqlprivs)
     
  13. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Bump

    Seems to be a regular re-occurring problem
     
  14. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Please don't bump threads. If you're having a problem and have tried all the recommendations in the forum for this issue (and there are a few), then you should pursue the issue through bugzilla or a ticket with your cPanel license provider.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page