MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO)

前端 未结 20 1684
失恋的感觉
失恋的感觉 2020-11-29 02:41

I installed xampp,but when I tried to run it I got an error as thus:

Error

MySQL said: Documentation

1045 - Access denied for user \'root\'@\'localhost

20条回答
  •  春和景丽
    2020-11-29 03:34

    I had this problem after changing the password for the root user in phpMyAdmin. I know nothing about programming but I solved it by doing the following:

    1. Go to file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php (I guess you would replace "wamp" with the name of your server if you're not using Wamp Server)

    2. Find the line $cfg['Servers'][$i]['password']='' and change this to

      $cfg['Servers'][$i]['password']='NO'
      
    3. Try opening phpMyAdmin again, and hopefully the message will now read "Access denied for user 'root'@'localhost' (using password: YES)

    4. Now change the password in the above line to 'yourpassword' (whatever you had set it to before)

    Hope this helps somebody.

提交回复
热议问题