Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-07-2009, 11:12 AM   #1
LQ Newbie
Registered: Aug 2008
Location: Pune
Distribution: Red Hat
Posts: 11

Rep: Reputation: 1
Unable to reset the root password for mysql on fedora

I have successfully installed mysql on my fedora machine and started up the server also. To get a firm knowledge about the installation and configuration of mysql, I deliberately uninstalled it using YUM. Now when second time I have installed mysql I am unable to set the root password using
/usr/bin/mysqladmin-u root password 'new password'

I have deleted the entry for mysql from /etc/passwd. Now when it is not allowing me to install mysql totally
1) What is the problem and how to solve it?
2) Where the installatin files are stored on linux as in Windows they are stored by default on c:?
3) What are /etc/rc.d and /etc/rc.d/init.d directories used for?

Any help will be appreciated.
thanx in advance>
Old 08-08-2009, 10:47 PM   #2
Senior Member
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
I would start by adding the mysql user back to the passwd file. This users is different and is used to control the mysql daemon.

to reset the lost password. do the following

1. stop the mysql server.
2. start the mysql with the following
mysqld_safe --skip-grant-tables &
3. connect to mysql
mysql -u root
4. use mysql database
5. use the following query
update user set password=PASSWORD('new password') where user=root
6 Now flush the privileges and quit
flush privileges
7. stop mysql
8. Now restart mysql in normal mode
/etc/init.d/mysqld start
and that should get your going again.


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
mysql: still can't login after root password reset andredude Linux - Software 4 12-19-2014 07:30 PM
Unable to set root password on new mysql install Arty Ziff Linux - Server 2 01-23-2009 12:17 AM
Unable to reset mysql root password soylentgreen Linux - Server 5 08-02-2008 11:05 PM
MySQL Root Password Reset carlosinfl Linux - Server 6 07-18-2008 04:58 AM
mysql root password reset. gtum5 Member Intro 0 03-08-2007 09:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:09 AM.

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