Skip to main content

Database Access from another cpanel account

Comments

11 comments

  • cPanelLauren
    Can you explain this better? Are you referencing the same cPanel account or the same server different cPanel accounts?
    0
  • Olusolaadeoti
    Yes Lauren. How can i disable one cPanel account from using the database on another cPanel account on the same server.
    0
  • ffeingol
    If both accounts know the user-id/password for the account, it would not be possible.
    0
  • Olusolaadeoti
    If both accounts know the user-id/password for the account, it would not be possible.

    I don't fully understand this. Here is what i mean. cPanelAcount1 can connect to cPanel Account2 database mere knowing just the database name. Is there a way to disable that in whm?
    0
  • ffeingol
    You can't connect to a database by simply knowing the name. You need a a user-id and password also.
    0
  • cPRex Jurassic Moderator
    Yes, we would need more details on the behavior you're seeing, as this should not be possible. For anyone to connect to a database they need the database name, a user that has been granted access to the database, and that database user's password. Just knowing the name is not enough to pull data from the database.
    0
  • Olusolaadeoti
    Yes, we would need more details on the behavior you're seeing, as this should not be possible. For anyone to connect to a database they need the database name, a user that has been granted access to the database, and that database user's password. Just knowing the name is not enough to pull data from the database.

    Okay yes, the database name, user and password was known. But i think only the cPanel user that owns a database should be able to connect to it and not outside that cPanel account
    0
  • cPRex Jurassic Moderator
    Unfortunately that isn't how MySQL works, as MySQL doesn't have any concept of cPanel accounts or users. All authentication details are taken from the mysql.users table, which stores access grants for database users.
    0
  • DennisMidjord
    But i think only the cPanel user that owns a database should be able to connect to it and not outside that cPanel account

    That's not how it works. If you know the username and password of a MySQL user, you will always be able to access it from localhost. Same as if cPanelUser1 knows cPanelUser2's password for cPanel - he would be able to login to cPanelUser2's cPanel account.
    0
  • Olusolaadeoti
    okay, thank you Dennis and cPRex
    0
  • cPRex Jurassic Moderator
    You're very welcome!
    0

Please sign in to leave a comment.