LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I change the root password of MYSQL server (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-change-the-root-password-of-mysql-server-711895/)

Muideen 03-16-2009 04:10 AM

How can I change the root password of MYSQL server
 
How can I change the root password of MYSQL server. I have just finished installation, but I mistakenly typed the wrong root password, and now I need to change it from command line, because I cannot even access the UI.

bathory 03-16-2009 04:30 AM

Just follow the instructions here

unixmen 03-16-2009 09:05 AM

LINK
 
please check the direct instructions LINK

Muideen 03-19-2009 11:24 AM

Thanks Unixmen, I have visited the url i found exactly what i needed cos i know the current password I want 2 change, but the problem is that I need 2 know if i am 2 login as root b4 running the command, and also if the values oldpasword and newpass need 2 be substituted with my values or if they are part of the syntax, then lastly I need 2 know if they are supposed to be in quotation (as string values are often represented)

Muideen 03-19-2009 11:33 AM

When I run the command as the local user, I get this error after typing the new password (I also tried root password)

[Parkway@localhost ~]$ mysqladmin -u root -p new-password dev9house
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'


When i tried running the command as root this is what I get

[Parkway@localhost ~]$ su -
Password:
[[root@localhost ~]# mysqladmin -u root -p new-password dev9house
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
You have new mail in /var/spool/mail/root

JaksoDebr 03-19-2009 06:49 PM

You will certainly need your old sql root password to run that operation, and it seems that your old password is not correct. Have you tried to login into mysql with that old password as user root? Did that work?

Linux Archive


All times are GMT -5. The time now is 05:45 PM.