List:General Discussion« Previous MessageNext Message »
From:Nitin Mehta Date:October 25 2012 6:45am
Subject:RE: MySQL password issue
View as plain text  
Hi Tim,

It looks like your '.sql backup file' has changed the password for root user and why it is
persisting is perhaps you have data directory outside the install directory.

How you correct the problem:

Stop the service, start the service with option '--skip-grant-tables', login with root
user and change the password from inside mysql.

Hope that helps.



-----Original Message-----
From: Tim Thorburn [mailto:webmaster@stripped] 
Sent: Thursday, October 25, 2012 12:08 PM
To: mysql@stripped
Subject: MySQL password issue

Hi All,

Today I ran into an interesting problem with my MySQL installation.  
I'll start off with the usual suspects: this is my development laptop running Windows 7
Ultimate 64-bit this is a fresh install, fully updated from Windows Update.  I downloaded
the Windows Installer version of MySQL which is MySQL 5.5.28 Community Server.  I ran the
setup choosing Developer install, made a root password, then created two users for Backup
and Replication.

The install completed successfully, and I was able to start MySQL Workbench logging in as
root once.  I made a user in Server Administration and then imported a .sql backup file. 
I then went to SQL Development to review the result of the restore.  I wasn't able to view
the imported tables, Workbench seemed stuck on Retrieving Tables.  This database is
driving a website I'm working on, and I was able to load the site in a browser on my
laptop - again once.

Next, I went to add another user, and then tried to import another .sql backup file.  This
time, when I clicked Start Import, Workbench prompted me to enter my root password again. 
Odd I thought, as I'd originally told Workbench to save the password in its vault. 
Unfortunately, Workbench won't accept the root password.  I receive the following message
in a popup window:

Cannot Connect to Database Server
Your connection attempt failed for user 'root' from your host to server at localhost:3306:
Access denied for user 'root'@'localhost' (using password: YES)

The MySQL Service is still running, I've tried stopping, starting, and just restarting the
service.  I've tried rebooting.  All with the same result.  What could have happened to
this install to make MySQL no longer accept my password?  I have already tried
uninstalling via the MySQL Installer, confirming that C:\ProgramData\MySQL was removed,
and then shutting Windows down completely before trying to re-install.  The same result
happens - I'm able to log in once, then several minutes later it will no longer accept a
password.  This is a fresh install again, so there's not a lot of pain in uninstalling
and reinstalling.

Any thoughts on why this is happening, or more importantly, how to correct the problem?

TIA,
-Tim
Thread
MySQL password issueTim Thorburn25 Oct
  • RE: MySQL password issueNitin Mehta25 Oct
    • Re: MySQL password issueTim Thorburn25 Oct