LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-07-2009, 11:12 AM   #1
cll975dll
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
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,056

Rep: Reputation: 94
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
Code:
mysqld_safe --skip-grant-tables &
3. connect to mysql
Code:
mysql -u root
4. use mysql database
5. use the following query
Code:
update user set password=PASSWORD('new password') where user=root
6 Now flush the privileges and quit
Code:
flush privileges
quit
7. stop mysql
8. Now restart mysql in normal mode
Code:
/etc/init.d/mysqld start
and that should get your going again.
 
  


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
mysql: still can't login after root password reset andredude Linux - Software 3 12-27-2012 10:48 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 LinuxQuestions.org Member Intro 0 03-08-2007 09:57 PM


All times are GMT -5. The time now is 09:52 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration