List:General Discussion« Previous MessageNext Message »
From:Michael Stassen Date:October 7 2004 10:58pm
Subject:Re: Resetting the password error
View as plain text  
Michael

FayeC SQL wrote:

>  While trying to login to the server I got the following errors:
> 
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> C:\>c:\mysql\bin\mysql -root -p
> Enter password: *****
> ERROR 1045: Access denied for user: 'ODBC@localhost' (Using password: YES)
> 
> C:\>c:\mysql\bin\mysql -root -p
> Enter password: ******
> ERROR 1045: Access denied for user: 'ODBC@localhost' (Using password: YES)

-root doesn't mean anything, so this is trying to log in as the default 
user, ODBC@localhost.  What you need is

   C:\>c:\mysql\bin\mysql -u root -p

> C:\>c:\mysql\bin\mysqlshow
> c:\mysql\bin\mysqlshow: Access denied for user: 'ODBC@localhost' (Using password
> : NO)

Same here.  Should be C:\>c:\mysql\bin\mysqlshow -u root -p

> C:\>c:\mysql\bin\mysqladmin -u root password my-password-here
> c:\mysql\bin\mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user: 'root@localhost' (Using password: NO)'

root@localhost already has a password, so you can't change it without 
authenticating.  Try

C:\>c:\mysql\bin\mysqladmin -u root -p password my-password-here

> C:\>c:\mysql\bin\mysqladmin -u root -h fayec password my-password-here
> c:\mysql\bin\mysqladmin: connect to server at 'fayec' failed
> error: 'Access denied for user: 'root@stripped' (Using password: NO)'

Here you change your connection method, but you still didn't give the 
password.  You need -p (and root@stripped would have to be an 
authorized user).

> Then I started the service with:
> 
> C:\>c:\mysql\bin\mysqld-nt --skip-grant-tables
> 
> I am now trying to reset my root password but I am getting errors when
> trying to do so.
> I followed the instructions on:
> http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html
> but when I get to the point I have to use:
> 
> flush-privileges password "newpwd"
> 
> I get the following error:
> 
> 'flush-privileges' is not recognized as an internal or external command,
> operable program or batch file.

I believe you've been bitten by bad formatting in the manual.  The command 
should be

C:\mysql\bin\mysqladmin -u root flush-privileges password "newpwd"

> I have no clue how to go on from here....anybody?? I am trying to
> login to be able to create a db but it won't let me through without a
> password and it won't accept the password I had set before (pretty
> sure about the old password as it is the same I use for all my local
> projects).
> 
> Any tips will be extremely appreciated. Thanks in advance.
> 
> FayeC

Michael
Thread
Resetting the password errorFayeC SQL8 Oct
  • Re: Resetting the password errorMichael Stassen8 Oct