LinuxQuestions.org
Review your favorite Linux distribution.
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 11-23-2006, 07:21 AM   #1
Venkatesh_cts
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Rep: Reputation: 0
Problem setting root password after reinstalling mysql


Hi All,
I'm new to linux and am using SuSe 10 Beta version. I installed MySQL 5.0.27 previously and later uninstalled it. Now when i try to reinstall using the same RPMs, it gets installed. But I'm unable to set the root password using "mysqladmin -u root password" command. Can someone help me on this?

Thanx in advance

Venkatesh
 
Old 11-23-2006, 07:25 AM   #2
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
what is the error message
what shows rpm -qa | grep mysql*
is mysqld running?
 
Old 11-23-2006, 07:31 AM   #3
Venkatesh_cts
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Original Poster
Rep: Reputation: 0
mysqladmin: unable to change password; error: 'Access denied for user ''@'localhost' to database 'mysql''
This is the exact error msg shown.

Last edited by Venkatesh_cts; 11-23-2006 at 07:47 AM.
 
Old 11-23-2006, 07:38 AM   #4
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
mysqladmin -u root password PaSsWoRd
if your are not started mysql console as root like root@localhost#mysql [enter]
but if you're unix root and you can gain access to the mysql console
then try
Code:
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root';
mysql> FLUSH PRIVILEGES;
 
Old 11-23-2006, 08:05 AM   #5
Venkatesh_cts
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Original Poster
Rep: Reputation: 0
The moment i say mysql -u root mysql,

It says ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
 
  


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
Setting a password for mysql. dave`2005 Slackware 2 05-29-2006 06:45 AM
Big problem changed root password for mysql can't login pls comment johnnydangerous Linux - Software 5 07-08-2005 01:22 AM
setting user password to mysql!! baby_linu Programming 3 03-09-2004 10:59 AM
Setting root password saxophobe Linux - Newbie 11 01-17-2004 12:33 PM
Mysql root password spintrance7 Linux - Software 7 11-29-2003 04:20 PM

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

All times are GMT -5. The time now is 01:59 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
Open Source Consulting | Domain Registration