Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Website not loading, access denied for user 'root'

chandanchandan New
edited October 2013 in Vanilla 2.0 - 2.8

Dear vanilla users,

It was quite a sudden that the website was not loading.

Then I inserted $configuration['Debug'] = TRUE; in the config.php file.

Now the website shows the following message: An error occurred while attempting to connect to the database SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES) The error occurred on or near: /srv/www/htdocs/vanilla/library/database/class.database.php

The error seems to be related with mysql database. Restarting the mysql server was in vain.

Vanilla 2.0 is installed on the linux server with OpenSuse OS.
Can someone guide me what might be the possible solutions.

Chandan

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    You need to update your /conf/config.php file with the proper database connection information. It will be near the top and look like this:

    $Configuration['Database']['Name'] = 'dbname';
    $Configuration['Database']['Host'] = 'localhost';
    $Configuration['Database']['User'] = 'root';
    $Configuration['Database']['Password'] = 'password';
    

    You need to replace the right hand side of each line with the proper information.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks hgtonight,

    Actually the server was running fine. No one played with the database. The information about the database is already present.

    If I need to reset the password, can you please suggest the commands. I am very new to mysql.

  • @chandan said:
    Access denied for user 'root'@'localhost'

    If you think that the solution that hgtonight gave you is the right solution, then google for the error message.

    And welcome to the community

    There was an error rendering this rich post.

  • Not related to your issue, but better not use the the root user for an application.

    Create a new user then you can grant the privalages that are necessary to the database. It is basic damage limitation.

    grep is your friend.

  • chandanchandan New
    edited October 2013

    Thanks UnderDog and x00. I googled and tried to reset the database password. The website is loading. @x00: I will indeed preserve your suggestion. Thanks everyone.

  • @chandan said:
    Thanks UnderDog and x00. I googled and tried to reset the database password. The website is loading. x00: I will indeed preserve your suggestion. Thanks everyone.

    In many system root access is disabled externally, and through scripting. You may have received an upgrade that did that. basically unless you logon to the server using the root user, you don't have root access to mysql, it is a security feature.

    grep is your friend.

Sign In or Register to comment.