If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to change MySQL root password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-05-09, 13:12
satimis satimis is offline
Registered User
 
Join Date: Jun 2006
Posts: 56
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 22:19.
Reply With Quote
  #2 (permalink)  
Old 04-06-09, 04:42
aschk aschk is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On