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 add database

Discussion in 'General Discussion' started by VipGeek, Apr 8, 2006.

  1. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Via a backend script or command line, how do I add a database for a domain and a mysql user with proper access to that database?

    Thanks
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  3. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Thanks sawbuck, If I add a database for the user autotest and I set the database name to autotest_testdb will it show up in their cpanel config? That is what I need it to do.

    Thanks
     
  4. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    OK, that does work however adding a user to that database does not work when it comes to cpanel.
     
  5. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I've done some searching on google and have found plenty of ways to add mysql users however they do not display properly in cpanel. Does anyone have any slight idea on how to add a database user via a backend script without going through the cpanel gui?
     
  6. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Does anyone have any idea?
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just curious here. Why not use cPanel for this?
     
  8. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Have you tried /scripts/mysqladduserdb?
     
  9. kistler

    kistler Well-Known Member

    Joined:
    Jan 27, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    What way do you want to do it? You can do it in ssh, and yeah I have a web "remote" way of doing it. The web way will make a database &/or user and give user rights to the database. But that would be much unsecured to have a remote system to add a database using the web
     
  10. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I want to be able to do it with a script, Add a database (I can easily do that) Then add a user to that database, I do not want to go into cpanel for that. I want to automate it completely.
     
Loading...

Share This Page