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.

Add User for Database form shell

Discussion in 'Database Discussions' started by sudonic, Sep 25, 2013.

  1. sudonic

    sudonic Member

    Joined:
    Oct 29, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I need to create a database more than 200. i create shell script and using this code :

    in mysql :
    Code:
    create database USERNAME_dbname;
    GRANT ALL PRIVILEGES ON USERNAME_dbname.* TO 'USERNAME_dbuser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
    
    and user dbmaptool :
    Code:
    /usr/local/cpanel/bin/dbmaptool USERNAME --type mysql --dbs USERNAME_dbname' && /usr/local/cpanel/bin/dbmaptool USERNAME --type mysql --dbusers 'USERNAME_dbuser'
    everything ok to this section, but in cPanel user don't added to database. i have read this :

    http://forums.cpanel.net/f354/creating-database-manually-193012.html
    http://forums.cpanel.net/f354/create-mysql-database-user-via-shell-71968.html
    http://forums.cpanel.net/f354/creating-database-manually-193012.html

    how can i fix this problem ?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. sudonic

    sudonic Member

    Joined:
    Oct 29, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Yes, i tested this option, but can't help me, i need this problem solved without WHM GUI, because i have many database and i can't create DB & user & add user to DB & import SQL file in DB manually.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket so we can take a closer look:

    Submit A Ticket

    You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page