LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-14-2011, 09:04 AM   #1
SSBN
Member
 
Registered: Apr 2003
Posts: 80

Rep: Reputation: 15
Changed my root user access for mysql access to Any from localhost


I did something silly and changed my root user access for mysql access to Any from localhost using webmin. I get an access dented when i try to open up the mysql editing page on webmin. Can any of you tell me if there is a way to change it back to hosts=localhost I am using webmin 1.5.30 on Centos 5.5. I am hoping i can change it by command line or if i can access the config files and change it that way?
 
Old 03-14-2011, 12:38 PM   #2
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
Can you run mysql from the command line? If so, check to see if you only have one entry for 'root' in your mysql database, in the user table. You can check it with:
Code:
# mysql -u root -p
<enter password when prompted>
mysql> use mysql;
mysql> select host, user from user;
If you only have an entry for 'root'@'%', then create a new entry for 'root'@'localhost' with the grant command.
Once you've verified root@localhost works, then you can drop root@%

Or if you see that you do have an entry for 'root'@'localhost' and you need to change your root password, see the article at http://www.howtoforge.com/setting-ch...root-passwords
 
Old 03-14-2011, 02:25 PM   #3
SSBN
Member
 
Registered: Apr 2003
Posts: 80

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by lrtward View Post
Can you run mysql from the command line? If so, check to see if you only have one entry for 'root' in your mysql database, in the user table. You can check it with:
Code:
# mysql -u root -p
<enter password when prompted>
mysql> use mysql;
mysql> select host, user from user;
If you only have an entry for 'root'@'%', then create a new entry for 'root'@'localhost' with the grant command.
Once you've verified root@localhost works, then you can drop root@%

Or if you see that you do have an entry for 'root'@'localhost' and you need to change your root password, see the article at http://www.howtoforge.com/setting-ch...root-passwords
That did the trick thanks for the help. The last time I asked a question online about linux was 2006. Good to see the help is still top notch from the user base.
 
  


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: Access denied for user 'root'@'localhost' (using password: NO) jun_tuko Linux - Software 3 03-05-2013 06:37 AM
[SOLVED] mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: 124vikas.dange@gmail.com Linux - Server 4 11-19-2010 01:36 AM
Mysql error 1045: Access denied for user 'root'@'localhost' (using password: YES) visitashu Linux - Server 15 11-10-2010 11:05 PM
mysql server ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pas tarak420 Linux - Server 2 09-18-2008 09:52 PM
Sarge mysql-server Access denied for user: root@localhost infinity432 Linux - Software 2 05-18-2005 11:42 PM


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

Main Menu
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