List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:May 29 2014 6:35pm
Subject:Re: access denied fpr user 'root'@'localhost' (using password: NO)
View as plain text  
Am 29.05.2014 20:22, schrieb Érico:
> I have ran the following to test a fix for an app issue :
> 
> delete from mysql.user where user='';
> 2lines got effected
> 
> after this I can´t connect through command line anymore :
> 
> ./mysqladmin -u root password <pwd>
> 
> I get access denied for user 'root'@'localhost" (using password:'NO')

your command line is plain wrong
as you can see in the response you are *not* using a password

./mysqladmin -u root --password=<pwd>

*don't do that at all* your password ends in the history
./mysqladmin -u root -p

after that you get a pwd-prompt

> how can I restore the db so I can connect through command line again ?

if you really need to login with a destroyed userdb make sure
that nobody else can access the server and use skip grant

http://stackoverflow.com/questions/1708409/how-to-start-mysql-with-skip-grant-tables


Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread
access denied fpr user 'root'@'localhost' (using password: NO)Érico29 May 2014
  • Re: access denied fpr user 'root'@'localhost' (using password: NO)Reindl Harald29 May 2014
    • Re: access denied fpr user 'root'@'localhost' (using password: NO)Érico29 May 2014
      • Re: access denied fpr user 'root'@'localhost' (using password: NO)Reindl Harald29 May 2014
        • Re: access denied fpr user 'root'@'localhost' (using password: NO)Érico29 May 2014
          • Re: access denied fpr user 'root'@'localhost' (using password: NO)shawn l.green29 May 2014
  • Re: access denied fpr user 'root'@'localhost' (using password: NO)Kishore Vaishnav29 May 2014
    • Re: access denied fpr user 'root'@'localhost' (using password: NO)Érico29 May 2014
  • Re: access denied fpr user 'root'@'localhost' (using password: NO)shawn l.green29 May 2014