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

前端 未结 20 1733
失恋的感觉
失恋的感觉 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:32

    Here's the solution to getting the 1045 Access denied for user 'root'@'localhost' (using password: NO) in phpMyAdmin.

    First here's what happens:

    The problem occurs when you change over from using phpMyAdmin with no password and mysql with no root password. You change root in mysql to having a root password. You dutifully change phpMyAdmin's config.ini.php file's $cfg['Servers'][$i]['password']='' line to include your password and restart everything you can find, but phpMyAdmin still can't get through.

    The reason is that your browser still contains cookies for phpMyAdmin and those cookies reflect not needing a password to access mysql.

    The solution:

    Clear out the cookies relating to phpMyAdmin. Its browser specific, but in my Firefox, its under Tools > Page Info > Cookies.

    You might need to relog in with phpMyAdmin or use the signon.php script (under /examples in my WAMP install).

提交回复
热议问题