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.

Create database via CLI

Discussion in 'General Discussion' started by zeromtrx, Jul 26, 2003.

  1. zeromtrx

    zeromtrx Member

    Joined:
    Jun 7, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Is there any way to easily create a mysql database for a user (as root) via the commandline? I'm trying to write a script that needs this functionality.

    Any help would be great.

    cPanel.net Support Ticket Number:
     
  2. zeromtrx

    zeromtrx Member

    Joined:
    Jun 7, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Anyone? Please? =]

    cPanel.net Support Ticket Number:
     
  3. mpierre

    mpierre Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Is there a way at all to do this ?

    cPanel.net Support Ticket Number:
     
  4. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    You can use mysqladmin to create a database from the command line. If you need to grant privs to a user, you can probably do this fairly easily with an bash/expect script.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page