Question

Message: mysqli::real_connect(): (HY000/1045)

I am unable to open my website. My website is completely down today. I am getting below error but it was working till morning and I have not done any changes in droplet or phpmyadmin level -

Severity: Warning

Message: mysqli::real_connect(): (HY000/1045): Access denied for user ‘crazydeal’@‘localhost’ (using password: YES)

Filename: mysqli/mysqli_driver.php

Line Number: 201

Backtrace:

File: /var/www/html/crazydeal/application/core/MY_Controller.php Line: 16 Function: __construct

File: /var/www/html/crazydeal/application/controllers/website/Home.php Line: 15 Function: __construct

File: /var/www/html/crazydeal/index.php Line: 316 Function: require_once


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @Rakshakar,

From the error message, you seem to be interested most in the :

Message: mysqli::real_connect(): (HY000/1045): Access denied for user ‘crazydeal’@'localhost’ (using password: YES)

See if your user crazydeal do has access to mysql. You can do that when SSHing to your server and typing:

mysql -u crazydeal -p 

It will ask you for the user’s password. Paste it there, if you don’t remebmer it you can take it from your config file. If it doesn’t work from there, I’ll suggest changing it directly in MySQL the following way:

mysql

And then

ALTER USER 'user-name'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';
FLUSH PRIVILEGES;

Regards, KFSys