LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2009, 04:10 AM   #1
Muideen
LQ Newbie
 
Registered: Mar 2009
Posts: 15

Rep: Reputation: 0
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.
 
Old 03-16-2009, 04:30 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,737

Rep: Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585
Just follow the instructions here
 
Old 03-16-2009, 09:05 AM   #3
unixmen
Member
 
Registered: Jan 2009
Posts: 39

Rep: Reputation: 16
LINK

please check the direct instructions LINK

Last edited by unixmen; 03-16-2009 at 09:07 AM.
 
Old 03-19-2009, 11:24 AM   #4
Muideen
LQ Newbie
 
Registered: Mar 2009
Posts: 15

Original Poster
Rep: Reputation: 0
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)
 
Old 03-19-2009, 11:33 AM   #5
Muideen
LQ Newbie
 
Registered: Mar 2009
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 03-19-2009, 06:49 PM   #6
JaksoDebr
Member
 
Registered: Mar 2009
Distribution: Fedora, Slackware
Posts: 104

Rep: Reputation: 21
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

Last edited by JaksoDebr; 04-02-2009 at 05:07 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
Lost mysql root password on slack server iiKster Slackware 6 12-29-2008 05:30 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 02:02 AM
I have forgetten my MySQL server root password. ERBRMN Linux - General 3 03-08-2007 08:59 PM


All times are GMT -5. The time now is 03:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration