Linux / UNIX Tech Support Forum
This is a discussion on Unable to change MySQL password within the Databases servers forums, part of the Mastering Servers category; Hi folks, I followed; MySQL Change root Password to change MySQL password. $ mysqladmin -u root -p oldpassword newpassword Enter ...
|
|||||||
| Databases servers Discussions of databases of all types - especially MySQL. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi folks,
I followed; MySQL Change 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. B.R. satimis |
| Sponsored Links | ||
|
|
|
||||
|
Are you sure you know the old password?
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Hi nixcraft,
YES. I succeeded changing MySQL root password with following steps; $ mysql -u root -p Code:
Enter password: oldpassword Code:
Query OK, 0 rows affected (0.32 sec) Code:
Bye I don't know why; $ mysqladmin -u root -p oldpassword newpassword did not work? B.R. satimis |
|
||||
|
There is small typo, here is the correct syntax, if:
OLDpassword is abc Newpassword must be 123456 Then command should be: Code:
mysqladmin -u root -p'abc' password 123456 Code:
mysqladmin -u root -p password 123456
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Quote:
$ mysqladmin -u root -p 'abc' password 123456 Code:
Enter password: abc mysqladmin: Unknown command: 'abc' But; $ mysqladmin -u root -p password 123456 Code:
Enter password: abc Another question:- MySQL is running as guest on this Xen box (it can be considered as remote server) Can I change the root password remotely without ssh-login the server first? (I don't have MySQL running on the host) B.R. satimis |
|
||||
|
Quote:
Only if mysql-networking is configured and root user is allowed to do so... (by default this is disabled) Code:
mysqladmin -h remote.server.com -u root -p password 123456 mysqladmin -h 192.168.5.100 -u root -p password 123456
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Quote:
I must do it in 2 steps $ ssh remote.server.com $ mysqladmin -u root -p password newpassword Enter password: oldpassword because I don't have mysqladmin running on the host of the Xen box. Quote:
$ mysqladmin -h remote.server.com -u root -p newpassword Code:
bash: mysqladmin: command not found satimis Last edited by satimis; 06-04-2009 at 12:01 PM. |
|
||||
|
Install mysqladmin command according to your Linux distribution. Also, it can be one command:
Code:
ssh remote.server.com mysqladmin -u root -p password newpassword
__________________
Vivek Gite Linux Evangelist |
![]() |
| Tags |
| change mysql password command , mysql , mysqladmin , password |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| change password in one go | vikas027 | HP-UX | 0 | 08-06-2008 02:46 PM |
| how to change root password | sandromax | Solaris/OpenSolaris | 4 | 11-10-2007 02:43 AM |
| Change root password MySQL 5 | chiku | Databases servers | 1 | 16-01-2007 08:46 PM |
| HP UX user lock password, change password, password aging | rockdalinux | HP-UX | 0 | 20-12-2006 02:36 PM |
| How to Change Password | puppen | Linux software | 6 | 06-06-2006 01:56 PM |