Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Using a SSH Command to Connect Existing DBase User to Existing DBase?

Discussion in 'General Discussion' started by tm2004, Sep 25, 2006.

  1. tm2004

    tm2004 Member

    Joined:
    Mar 1, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    151
    Hey All...

    Trying to figure this out... want to work with a shell command (instead of using cPanel). Want to create a new database and add an existing dbase user to that Dbase all via Shell


    1. Create new Database
    # mysql
    # create database dom1_test1;

    ... WORKS


    2. Then want to Connect User dom1_user9 (already have it setup via cPanel with august66 as password) with ALL privileges to the Dbase above...

    # GRANT ALL PRIVILEGES ON dom1_test1 TO
    'dom1_user9'@'localhost' IDENTIFIED BY 'august66' WITH GRANT OPTION;

    ... DOES NOT WORK

    Have tried dozens of variations.. with no success.. Can anyone see what I am missing?
     
  2. maheshkasbe

    maheshkasbe Registered

    Joined:
    Aug 26, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Mysql grant

    Use this man You will get success,let me know if yes


    mysql>GRANT ALL PRIVILEGES ON dom1_test1
    TO dom1_user9@localhost IDENTIFIED BY "august66" WITH GRANT OPTION;


    mysql>grant insert,delete,update,select on dom1_test1.*
    to dom1_user8@localhost identified by "august66" ;


    Both are same.:rolleyes:
     
  3. tm2004

    tm2004 Member

    Joined:
    Mar 1, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    151
    Thanks for the reply. Can't get it to work..

    Both commands respond with:

    Query OK, 0 rows affected (1.16 sec)

    but then cPanel still does NOT show the user connected to the dBase.. Driving me crazy! :rolleyes:
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice