LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-11-2009, 03:51 PM   #1
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Rep: Reputation: 15
Locked out of MySQL somehow!


This could probably be in a better topic but this looks fitting for now!

OK so out of nowhere (no system changes or anything) I am unable to login (usefully) as root to mysql. The only thing I can think of is some sort of security that was triggered when I tried to use mysql admin from windows.

MySQL is running on my Gentoo server and here is what is happening...

I have a website I run for tracking reptile feedings and other stats, can't connect to that db and i can't change the password for root! I have restated the service, but that didn't help.

Code:
mysql> UPDATE mysql.user SET Password=PASSWORD('foobar') WHERE User='root';
ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user'
mysql>
Code:
# /usr/bin/mysqladmin -u root password 'foobar'
/usr/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'
ran /usr/bin/mysql_secure_installation as suggested to fix the issue...

Code:
Set root password? [Y/n] Y
New password:
Re-enter new password:
ERROR 1142 (42000) at line 1: UPDATE command denied to user ''@'localhost' for table 'user'
Password update failed!
and some more info...

Code:
mysql> show grants;
+--------------------------------------+
| Grants for @localhost                |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.01 sec)
I have about 10 databases total - not sure if that is what I should be seeing at this point? Anyone seen this before?

My cacti is still running so it is not a system wide problem. But I need to get the root user back to normal ASAP!
 
  


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
Locked myself out of mysql...root user db table destroyed organica Linux - Server 2 12-08-2006 10:35 AM
Completely uninstalling MySQL and its passwords passwords...how? I locked myself out! Baix Linux - Newbie 2 01-30-2005 04:10 PM
locked out of mysql database adcripps Linux - General 3 09-06-2002 01:47 PM
HELP!! I just locked myself out of MySQL!! What an idiot -----------> FunkFlex Linux - Newbie 0 01-27-2002 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:32 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