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!