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

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

    I had this problem with a fresh install of wamp and using only default settings without setting any passwords. I found an incorrect default setting and I solved it by the following steps:

    1. Go to C:\wamp\apps\phpmyadmin4.1.14 (Your phpmyadmin version# may differ)
    2. open the file config.inc in a text editor
    3. find the line: $cfg['Servers'][$i]['host'] = '127.0.0.1';
    4. change it to $cfg['Servers'][$i]['host'] = 'localhost';
    5. save the file
    6. restart all services in wamp

    The problem seems to be that someone forgot to make the server and host match in the configuration files.

提交回复
热议问题