MYSQL; setting/updating the root password question...

Discussion in 'HOWTO-Related Questions' started by rh-penguin, Jan 30, 2007.

  1. rh-penguin

    rh-penguin New Member

    hi,

    Im doing the: How To Set Up A Ubuntu/Debian LAMP Server(Im using debian)
    About half way down is the MYSQL Section.
    Code:
    Creating users to use MySQL and Changing Root Password
    
    By default mysql creates user as root and runs with no passport. You might need to change the root password.
    
    To change Root Password
    
    mysql -u root
    mysql> USE mysql;
    mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
    mysql> FLUSH PRIVILEGES;
    On the line:
    Code:
    mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE
    Would i put:
    Code:
    mysql> UPDATE user SET Password=[B]dondude4482[/B]('new-password') WHERE
     
  2. marsvin

    marsvin New Member

    No you'd put:
    Code:
    mysql> UPDATE user SET Password=password('dondude4482') WHERE etc...
    
    The first "password" is the name of the column you're updating (the "password" column in the "user" table.) The second "password" is a mysql function that encrypts whatever is between the parenthesis and 'dondude4482' is your actual password.

    -- marsvin
     
  3. rh-penguin

    rh-penguin New Member

    ok, thanks
     

Share This Page