www.webdeveloper.com
Results 1 to 3 of 3

Thread: Changing user from root

  1. #1
    Join Date
    Oct 2008
    Location
    Seattle, Wa
    Posts
    695

    Changing user from root

    I am currently running everything from our WWW2 server as the root
    user, but understand that this is a security issue. I would like to change
    my user who runs everything to a new admin/user account but am not
    sure how to set it up. I am running MySql on Ubuntu, any suggestions?
    _,-O
    O
    (_)) ubuntu -
    -`-O

  2. #2
    Join Date
    Jul 2010
    Location
    /ramdisk/
    Posts
    865
    As root run these:

    Code:
    CREATE USER 'test'@'%' IDENTIFIED BY 'PASSWORD';
    
    GRANT SELECT,INSERT,UPDATE,DELETE ON * . * TO 'test'@'%' IDENTIFIED BY 'PASSWORD' 
    WITH 
    MAX_QUERIES_PER_HOUR 0 
    MAX_CONNECTIONS_PER_HOUR 0 
    MAX_UPDATES_PER_HOUR 0 
    MAX_USER_CONNECTIONS 0 ;
    The 'test'@'%' means they can connect from any host.
    It could also be 'localhost', '192.168.%.%', etc.

    The * . * means you are granting these privileges for every database and every table, and again you have a 'test'@'%'. The 0s mean unlimited.

    You will have to read the CREATE USER manual for all of the details.
    http://dev.mysql.com/doc/refman/5.1/en/create-user.html
    http://dev.mysql.com/doc/refman/5.1/en/grant.html
    Last edited by eval(BadCode); 03-01-2011 at 06:05 PM.

  3. #3
    Join Date
    Oct 2008
    Location
    Seattle, Wa
    Posts
    695
    Thanks home slice
    _,-O
    O
    (_)) ubuntu -
    -`-O

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles