MySQL Forums
Forum List  »  Newbie

Password reset
Posted by: Shuja Khan
Date: May 27, 2008 09:06AM

Problem:
1. root password to mysql db is lost

MYSQL info:
1. I am using mysql db as an RPM based install (during OS install).
2. version: mysql Ver 14.12 Distrib 5.0.54, for redhat-linux-gnu (x86_64) using readline 5.1
3. OS version: 2.6.9-67.0.1.EL.plus.c4smp #1 SMP Wed Dec 26 08:30:41 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Recovery attempts:
1. we have tried the following method to recover mysql password.

a. stoped mysql, /etc/init.d/mysqld stop
b. create a text file abc.txt with following contents

UPDATE mysql.user SET Password=PASSWORD('1234') WHERE User='root';
FLUSH PRIVILEGES;

c. mysqld_safe --init-file=/root/abc.txt &
d. When executed following is printed on screen

--->Start of output
[root@server ~]# mysqld_safe --init-file=/root/abc.txt &
[1] 20454
[root@server ~]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080527 15:20:48 mysqld ended


[1]+ Done mysqld_safe --init-file=/root/abc.txt
[root@server ~]#
--->>> end of output

Still we are unable to logon to our mysql as root. We cannot create tables, users, etc, but standard users can logon using their username & password but not the root.

Please help recover lost root password for mysqldb

Thanks in advance for your kind help

-shuja



Edited 2 time(s). Last edit at 05/27/2008 09:09AM by Shuja Khan.

Options: ReplyQuote


Subject
Written By
Posted
Password reset
May 27, 2008 09:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.