Bug #12523 MySQL Error 1045 - Access denied for ALL USERS.
Submitted: 11 Aug 2005 13:17 Modified: 11 Sep 2005 18:50
Reporter: Don Burnette Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:Server 4.1.12a OS:Windows (Windows XP/2003 Server)
Assigned to: CPU Architecture:Any

[11 Aug 2005 13:17] Don Burnette
Description:
A few days ago I began to receive a 1045 Access Denied error when connecting to my home (WinXP) MySQL server using root@localhost. This is a private server, and I have only configured the root account, which is using a password. This password has been correct for months, it's been saved, and I definitely know what it is. I cannot connect through QBrowser, Administrator, CMD, or a webpage. My testing server is effectively dead. I tried completely removing all MySQL components from my machine and reinstalling them. This did not fix the problem. While a bit upsetting, I dismissed the problem as my own personal fault, figuring surely I have done something wrong.

Well,

This morning (8:00am Est), I wake up to find that I cannot seem to connect to my LIVE PRODUCTION SERVER (Win Server 2003) with the same error using my remote login account. I quickly remote desktop in to find out that the latest windows update was just installed, and that the server had been restarted. No other changes have been made. I try to login through QBrowser, Administrator, CMD, and webpage using both my remote account, and the root account. I received 1045 Error, Access denied from all methods listed above using both accounts. Both accounts have saved passwords which have been in use for quite some time. Again, I know the passwords and have tried to enter them manually. I have also tried resetting the root password, and I still receive this error. Also, all permissions are correctly set.

Thus, my production server is effectively dead as well. I no longer think this is a mistake on my part. It seems to be due to the latest windows update. 

I could not find any report of this problem anywhere.

How to repeat:
Download the latest Windows Update both (XP and 2003)
[11 Aug 2005 18:50] Aleksey Kishkin
Don, we need reproduceable testcase for debugging this problem. 
BTW. you can restart mysql server with --skip-grant-tables option (in order to omit password checking in mysql) login without any password and check permissions for root and other users by 'show grants' command (or inspecting tables users, hosts in the 'mysql' database)
[26 Aug 2005 18:48] Jim Barrick
I encountered this exact same error on a W2K Server with all latest patches as follows:

I started this morning with a production 4.0 version and tried to upgrade to 4.1.15.  I first shut down and removed the 4.0 service and uninstalled 4.0 completely.  I also removed all the 4.0 databases.  Then I did a clean install with the 4.1 exe.  Same problem.  Uninstalled, rebooted, reinstalled (did whole cycle twice) only to encounter same error consistently.  I used a complex 8-char password (also tried the simpler "test" password).  

Used TCPView to verify no other apps running on port 3306 (one is running on 3300, though).  Intalled latest ODBC drivers my MySQL (3.51).  No change.

I do have a cisco firewall with port 3306 blocked.  I disabled the firewall by unplugging network connectivity from the server and still had the same error.  There is no other "firewall" software on the machine.
[26 Aug 2005 19:04] Jim Barrick
Actually I was installed 4.1.14 (sorry).  To the previous poster.  After I did the (now) 3rd install and received the same error, I shut down mySQL and restarted with the --skip-grant-tables option.  I get the SAME ERROR!
[11 Sep 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Jul 2007 18:44] Richard Katz
Using MySQL 5, I can not query for grants after starting with: 

    mysqld-nt --skip-grant-table

In direct contrast to what is said in this bug answer, I get:

   "ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement." 

when I try to run > show grants;

Second, now when I start the server without --skip-grant-tables, it doesn't actually start up.

What do I do to restore MySQL to operate normally?