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

Discussion in 'General Discussion' started by ourweb, Apr 20, 2009.

  1. ourweb

    ourweb Well-Known Member

    Joined:
    Aug 9, 2004
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    i know how to add a mysql user from the command line, but how do i add an user to a database with full rights from the command line
     
  2. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    Umm... that was a simple google search ;)

    GRANT ALL ON *.* TO 'new_username'@'localhost';

    all privs on all databases, which I assume you don't want, so change the *.* to the database name. (database.*)
     
Loading...

Share This Page