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.

MySQL and usernames...

Discussion in 'General Discussion' started by martekbiz, Apr 3, 2004.

  1. martekbiz

    martekbiz Member

    Joined:
    Mar 17, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    When I create a new account in WHM, I noticed that a MYSQL user is also created.

    Since this is the case, WHY is it that when in Cpanel I go to create a database, etc... I cannot use the username that was already created and instead have to use something that looks like: username_ (the _ appended after the username)?

    It looks ugly and makes no sense!

    Any ideas????

    Thanks!

    Aaron
     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Why's it matter what it looks like? C'mon now.
     
  3. martekbiz

    martekbiz Member

    Joined:
    Mar 17, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Re: Re: MySQL and usernames...

    Alright, I can accept that... but why the hell do you need two different usernames for the same user????

    A
     
  4. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    You can create new users with fewer user privs (like just 1 db or just SELECT privs) than your mail mysql db. It's also less risky to expose a mysql db password in a script than your main account password.
     
  5. fishfreek

    fishfreek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    238
    Likes Received:
    0
    Trophy Points:
    16
    You do?

    Maybe this is something new in some new release of cpanel but back before i knew better I would create databases and run them with my main cpanel username/password with no problems at all.

    Now that was a while ago and I wised up as to why thats not the best idea in the world.

    Let me give you a little rundown on why I dont think its a good idea. Lets say for some god forbid reason your database is hacked by someone finding an exploit in some php, or asp, or java code and they obtain your username and pass and database name that you use to connect to your database. If this username/pass is the exact same as your cpanel account then its very easy for them to hack into your account and cause all kinds of bad things.

    By making the username/pass for the database different than that of your cpanel account if the above happens then about the only thing they can do is compromise your database and steal info or delete info. Neither is good but both is better than a total loss by compromising your main account info.
     
Loading...

Share This Page