#1045 - Access denied for user 'root'@'localhost' (using password: YES)

前端 未结 23 3403
刺人心
刺人心 2020-11-30 01:39

This might seem redundant but I was unable to find a correct solution.

I was unable to login to mysql using the mysql console.It is asking for a password and I have

相关标签:
23条回答
  • 2020-11-30 02:29

    Try the following code:

    $cfg['Servers'][$i]['password'] = '';
    

    if you see Password column field as 'No' for the 'root' user in Users Overview page of phpMyAdmin.

    0 讨论(0)
  • 2020-11-30 02:29

    For UNIX, try this. It worked for me:

    1. connect MySQL use Navicat Premium with inital root/"password"
    2. UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPass'), password_expired = 'N' WHERE User = 'root' AND Host = 'localhost'; FLUSH PRIVILEGES;
    3. restart MySQL
    0 讨论(0)
  • 2020-11-30 02:30

    mysql.exe->Run as administrator or go to following path C:\wamp\bin\mysql\mysql5.5.24\bin and than right click on mysql.exe go to properties and than select tab as Compatibility and see the bottom of dialog box in privilege level and just check the Run this program as an administrator and then click apply ok.finished now you open success phpMyadmin. bye

    0 讨论(0)
  • 2020-11-30 02:32

    This worked for me. In your config file

    $cfg['Servers']['$i']['password'] = 'yourpassword';
    

    In your mysql shell, login as root

    mysql -u root
    

    change your password or update if you've forgotten the old one

    UPDATE mysql.user SET Password=PASSWORD('yourpassword') WHERE User='root';
    

    stop and restart your mysql server from the xampp control panel. phpmyadmin can login to see your databases

    0 讨论(0)
  • 2020-11-30 02:35

    I had the same error today. I had installed Djangostack and when I checked my task manager there were two instances of mysqld running. I checked one was for wamp server and the other was for django stack. I ended the one for django stack, restarted all services in wamp server and I was able to access phpmyadmin

    0 讨论(0)
  • 2020-11-30 02:37

    Just now I have this situation and I have tried this way which is very easy.

    First stop your mysql service using this command:

    service mysql stop
    

    and then just again start your mysql service using this command

    service mysql start
    

    I hope it may help others... :)

    0 讨论(0)
提交回复
热议问题