So if I type mysql -u root
I'm supposedly logged in, however upon trying to create or access a database I get this lovely error: ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'test1'
. I haven't the foggiest idea why after logging in as root it's trying access DB's as ''@'localhost'
and it's driving me a bit crazy right now. Possibly related, when I try to set the root password I get the error mysqladmin: Can't turn off logging; error: 'Access denied; you need (at least one of) the SUPER privilege(s) for this operation'
. I've tried removing mysql-server via running apt-get purge mysql-server
and then reinstalling with no luck. This is running Ubuntu Server 12.10 64-bit and mysql is indeed running.
--Edit--
I wonder if perhaps there is no root user. So I try to start MySQL with --skip-grant-tables
and the create the root user but then I'm given this:
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
. Fun fun fun fun fun.
--Edit Again--
I've taken a blunt hammer to all things mysql on the maching and ran as root apt-get remove .*mysql.*
and apt-get purge .*msyql.*
and then reinstalled everything. Installation went as regularly expected this time. If no one can come up with an answer to this (and it probably doesn't help that the problem doesn't exist to test anymore) I'll answer the question myself... it seems with something like this, absolutely removing the bad install was the best option.
--Edit once more--
I've discovered what caused the problem. I ran rake db:create
and rake db:migrate
and my freshly installed and properly functioning MySQL is now back to having the same issues. I am wondering if perhaps the rake task has taken over MySQL like that one fungus takes over an ant... my MySQL is a rake infested zombie ant(?!?!?!?!).