Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Posts
    63

    Unanswered: How to change MySQL root password

    Hi folks,


    I followed;
    http://www.cyberciti.biz/faq/mysql-c...root-password/

    to change MySQL password.

    $ mysqladmin -u root -p oldpassword newpassword
    Enter password: (enter Mysqladmin Password here)
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'


    As root
    # mysqladmin -u root -p oldpassword newpassword
    Enter password:
    mysqladmin: Unknown command: 'MysqladminPassword'


    Please help.


    Edit:

    I can change MySQL root password with following steps;

    $ mysql -u root -p
    Code:
    Enter password: oldpassword
    mysql> set password = password("newpassword");
    Code:
    Query OK, 0 rows affected (0.32 sec)
    mysql> quit
    Code:
    Bye

    Then I can login MySQL with newpassword.


    I don't know why;
    $ mysqladmin -u root -p oldpassword newpassword

    did not work?


    B.R.
    satimis
    Last edited by satimis; 04-05-09 at 23:19.

  2. #2
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    I think you're getting confused about what mysqladmin utility can do. Please read the syntax and you should realise where you were going wrong.
    MySQL :: MySQL 5.1 Reference Manual :: 4.5.2 mysqladmin ? Client for Administering a MySQL Server

Posting Permissions

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