linux - MySQL - ERROR 1045 - Access denied -


When I try to access MySQL through the command line, I receive this error:

Access denied for password '@' localhost (using password: yes) / Pre>

I used this HowTo to reset the password without any luck have tried.

I uninstalled and reinstalled mysql completley but I still have been asked for a password

environment

Fedora Core 10 , Install full root access, Apache and PHP

Thanks for any help!

Edit

All those who want to save themselves a few hours "from the cough" - when you uninstall MySQl, you have to completely remove everything If you do not do that which is left behind, then it will never install FRESH.

If you are actually set a root password and you've lost / forgot it:

  1. Turn off MySQL
  2. Manually restart it with the Skip-Grant-Table option: Mysqld_safe - skip-grant-tables mysql -u root

  3. >

    Reset the root password with this MySQL command: UPDATE mysql.user SET password = password ('password') where using Ta = 'root'; If you are using MySQL 5.7 (using mysql --version in the terminal) the command is:

      UPDATE mysql.user SET authentication_string = PASSWORD ('password' ) Where user = 'root';  
  4. Flush privileges with this MySQL command: FLUSH Privileges;

    In the future, despite this question can be useful to people)


Comments