LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 10: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, 09:47 PM   #2
jstephens84
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
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



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 06:30 PM
Unable to set root password on new mysql install Arty Ziff Linux - Server 2 01-22-2009 11:17 PM
Unable to reset mysql root password soylentgreen Linux - Server 5 08-02-2008 10:05 PM
MySQL Root Password Reset carlosinfl Linux - Server 6 07-18-2008 03:58 AM
mysql root password reset. gtum5 LinuxQuestions.org Member Intro 0 03-08-2007 08:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:29 PM.

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
Open Source Consulting | Domain Registration