[FIXED] #1045 Access Denied For User Localhost on Ubuntu Linux


I get this error while I am developing my website on the localhost on my laptop. I have Ubuntu 18.04 LTS installed, and I use the native /var/www/html directory for the apache client.

The error shown in phpmyadmin page:

mysqli_real_connect(): (HY000/1045): Access denied for user ‘root’@’localhost’ (using password: YES)

and this error too.

#1045 – Access denied for user ‘root’@’localhost’ (using password: YES)

I found that I was using the wrong username and password for the phpmyadmin so I get them from the /etc/phpmyadmin directory from a file called config-db.php

I hope you find it useful. AND THANKS FOR WATCHING!

Nguồn: https://saesrpg.net/

Xem thêm bài viết khác: https://saesrpg.net/giai-tri/


  1. Lo Majweb 7 July, 2020 at 15:36 Reply

    Yes, I found it terribly useful after days trying to modify another file … Thank you so much. Great !

  2. Michael J. Breslin 7 July, 2020 at 15:36 Reply

    This worked beautifully! Thanks very much. I have been at this for the last 4 hours! Much appreciated.

  3. vincenzo boccia 7 July, 2020 at 15:36 Reply

    hello, I have run your video step by step but when I enter user and password it still tells me access denied
    can you help me?

Leave a reply