LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 08: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, 08:25 AM   #2
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 30
what is the error message
what shows rpm -qa | grep mysql*
is mysqld running?
 
Old 11-23-2006, 08: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 08:47 AM.
 
Old 11-23-2006, 08:38 AM   #4
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 30
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, 09: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


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


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